]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Don't treat as separate symbols if unversioned symbol is undefined.
authorCary Coutant <ccoutant@gmail.com>
Tue, 27 Sep 2016 19:08:19 +0000 (12:08 -0700)
committerCary Coutant <ccoutant@gmail.com>
Tue, 27 Sep 2016 19:24:09 +0000 (12:24 -0700)
When we see an unversioned symbol reference in a shared library, followed
by a default definition of the symbol in another shared library, we were
treating them as separate symbols. That should only happen when both are
definitions.

gold/
PR gold/20238
* symtab.cc (Symbol_table::define_default_version): Check that
unversioned symbol is defined.

gold/ChangeLog
gold/symtab.cc

index 7e69839f1c5a638dcdfb9a8402877aa6debf94ec..f5005ef96a3a085e7dccc4762e259fb5f144ad6e 100644 (file)
@@ -1,3 +1,9 @@
+2016-09-26  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20238
+       * symtab.cc (Symbol_table::define_default_version): Check that
+       unversioned symbol is defined.
+
 2016-08-23  Roland McGrath  <roland@hack.frob.com>
 
        * options.h (General_options): Grok -z stack-size.
index b31794a5a8cd49f7737473015a933418effe1600..c872f47d38638540278e1dcc05caee1195d88f5d 100644 (file)
@@ -882,6 +882,7 @@ Symbol_table::define_default_version(Sized_symbol<size>* sym,
        ;
       else if (pdef->second->is_from_dynobj()
               && sym->is_from_dynobj()
+              && pdef->second->is_defined()
               && pdef->second->object() != sym->object())
         ;
       else