PR 10450
authorIan Lance Taylor <ian@airs.com>
Wed, 30 Dec 2009 07:40:01 +0000 (07:40 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 30 Dec 2009 07:40:01 +0000 (07:40 +0000)
* symtab.h (Symbol::needs_dynsym_entry): A symbol in both a
regular and a dynamic object only needs a dynamic symbol table
entry if it is externally visible.

gold/ChangeLog
gold/symtab.h

index a8cd1cbf11b94b80ce124a60dbfaec5b268aaa89..95160724c266f2160e5bb8af294ab1eb051e6874 100644 (file)
@@ -1,5 +1,10 @@
 2009-12-29  Ian Lance Taylor  <iant@google.com>
 
+       PR 10450
+       * symtab.h (Symbol::needs_dynsym_entry): A symbol in both a
+       regular and a dynamic object only needs a dynamic symbol table
+       entry if it is externally visible.
+
        PR 10450
        * i386.cc (class Target_i386): Initialize global_offset_table_ in
        constructor.  Add global_offset_table_ field.
index ed105c7a68acb978789e173d662b0fea1c061df1..cac7beed861972e4a95c81cd1e948fec39e466c2 100644 (file)
@@ -261,7 +261,9 @@ class Symbol
   needs_dynsym_entry() const
   {
     return (this->needs_dynsym_entry_
-            || (this->in_reg() && this->in_dyn()));
+            || (this->in_reg()
+               && this->in_dyn()
+               && this->is_externally_visible()));
   }
 
   // Mark this symbol as needing an entry in the dynamic symbol table.