From: Ian Lance Taylor Date: Wed, 30 Dec 2009 08:29:37 +0000 (+0000) Subject: PR 10450 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=176fe33f0d2b5c96ea89acba35b684757bdf6e52;p=binutils-gdb.git PR 10450 * dynobj.cc (Dynobj::create_gnu_hash_table): Add symbols to the GNU hash table if they need a dynamic value. Otherwise, don't add them if they are defined in a dynamic object or are forced local. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 860eda95014..8acaf87621b 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,10 @@ +2009-12-30 Ian Lance Taylor + + PR 10450 + * dynobj.cc (Dynobj::create_gnu_hash_table): Add symbols to the + GNU hash table if they need a dynamic value. Otherwise, don't add + them if they are defined in a dynamic object or are forced local. + 2009-12-29 Ian Lance Taylor PR 10450 diff --git a/gold/dynobj.cc b/gold/dynobj.cc index ebb5f33ad9d..f982c4b469d 100644 --- a/gold/dynobj.cc +++ b/gold/dynobj.cc @@ -959,9 +959,10 @@ Dynobj::create_gnu_hash_table(const std::vector& dynsyms, { Symbol* sym = dynsyms[i]; - // FIXME: Should put on unhashed_dynsyms if the symbol is - // hidden. - if (sym->is_undefined()) + if (!sym->needs_dynsym_value() + && (sym->is_undefined() + || sym->is_from_dynobj() + || sym->is_forced_local())) unhashed_dynsyms.push_back(sym); else {