aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-12-30 08:29:37 +0000
committerIan Lance Taylor <ian@airs.com>2009-12-30 08:29:37 +0000
commit176fe33f0d2b5c96ea89acba35b684757bdf6e52 (patch)
tree30897a025b15b8a846dca61fdea19608d571b54a
parent1b81fb710f222c7ad23396a40b59314b7fe0ba5b (diff)
downloadgdb-176fe33f0d2b5c96ea89acba35b684757bdf6e52.zip
gdb-176fe33f0d2b5c96ea89acba35b684757bdf6e52.tar.gz
gdb-176fe33f0d2b5c96ea89acba35b684757bdf6e52.tar.bz2
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.
-rw-r--r--gold/ChangeLog7
-rw-r--r--gold/dynobj.cc7
2 files changed, 11 insertions, 3 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 860eda9..8acaf87 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-30 Ian Lance Taylor <iant@google.com>
+
+ 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 <iant@google.com>
PR 10450
diff --git a/gold/dynobj.cc b/gold/dynobj.cc
index ebb5f33..f982c4b 100644
--- a/gold/dynobj.cc
+++ b/gold/dynobj.cc
@@ -959,9 +959,10 @@ Dynobj::create_gnu_hash_table(const std::vector<Symbol*>& 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
{