From: Cary Coutant Date: Tue, 27 Sep 2016 19:08:19 +0000 (-0700) Subject: Don't treat as separate symbols if unversioned symbol is undefined. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3f07b5b750554bbbbee1bddc34bb77fd7d31eeb;p=binutils-gdb.git Don't treat as separate symbols if unversioned symbol is undefined. 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. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index d791d2940f2..1e01a4a247b 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2016-09-26 Cary Coutant + + PR gold/20238 + * symtab.cc (Symbol_table::define_default_version): Check that + unversioned symbol is defined. + 2016-09-26 Vlad Zakharov * Makefile.in: Regenerate. diff --git a/gold/symtab.cc b/gold/symtab.cc index b31794a5a8c..c872f47d386 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -882,6 +882,7 @@ Symbol_table::define_default_version(Sized_symbol* sym, ; else if (pdef->second->is_from_dynobj() && sym->is_from_dynobj() + && pdef->second->is_defined() && pdef->second->object() != sym->object()) ; else