PR gold/12818
authorIan Lance Taylor <ian@airs.com>
Wed, 29 Jun 2011 14:43:08 +0000 (14:43 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 29 Jun 2011 14:43:08 +0000 (14:43 +0000)
* symtab.cc (Symbol::should_add_dynsym_entry): Don't add undefined
symbols which are not used in a relocation.

gold/ChangeLog
gold/symtab.cc

index b765cd49462a3b55fee36fff18e46661f0346822..e62857d8e9da4db08699f7c5d7f493e72a8ec7a7 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-29  Ian Lance Taylor  <iant@google.com>
+
+       PR gold/12818
+       * symtab.cc (Symbol::should_add_dynsym_entry): Don't add undefined
+       symbols which are not used in a relocation.
+
 2011-06-28  Ian Lance Taylor  <iant@google.com>
 
        PR gold/12898
index 3df86b55c8fb204366546d1204365ce7780e1205..7e5b66c83dd8ed6c4dd309b1b42cd8744300cd13 100644 (file)
@@ -414,6 +414,7 @@ Symbol::should_add_dynsym_entry(Symbol_table* symtab) const
   // externally visible, we need to add it.
   if ((parameters->options().export_dynamic() || parameters->options().shared())
       && !this->is_from_dynobj()
+      && !this->is_undefined()
       && this->is_externally_visible())
     return true;