2010-02-18 Rafael Ávila de Espíndola <respindola@mozilla.com>
authorRafael Ávila de Espíndola <respindola@mozilla.com>
Fri, 18 Feb 2011 14:55:33 +0000 (14:55 +0000)
committerRafael Ávila de Espíndola <respindola@mozilla.com>
Fri, 18 Feb 2011 14:55:33 +0000 (14:55 +0000)
* symtab.cc (Symbol::should_add_dynsym_entry) Return false for
plugin only symbols.
(Symbol_table::sized_finalize_symbol) Mark symbol only present
in plugin files as not needed in the symbol table.

gold/ChangeLog
gold/symtab.cc

index 6bdc568fbcc7f057c594320ced9ba4cdb400b2b8..e7676ca2c7f091c467028b3066dac618c08baeaf 100644 (file)
@@ -1,3 +1,10 @@
+2010-02-18  Rafael Ávila de Espíndola <respindola@mozilla.com>
+
+       * symtab.cc (Symbol::should_add_dynsym_entry) Return false for
+       plugin only symbols.
+       (Symbol_table::sized_finalize_symbol) Mark symbol only present
+       in plugin files as not needed in the symbol table.
+
 2011-02-11  Sriraman Tallam  <tmsriram@google.com>
 
        * output.cc (Output_section::add_input_section): Delay fill
index cb650fb088a30868046b081387a651a537b2ad80..d4ac297792a9b4d9089fb7e34b5cc333dbdbb9e3 100644 (file)
@@ -310,6 +310,11 @@ Sized_symbol<size>::allocate_common(Output_data* od, Value_type value)
 inline bool
 Symbol::should_add_dynsym_entry(Symbol_table* symtab) const
 {
+  // If the symbol is only present on plugin files, the plugin decided we
+  // don't need it.
+  if (!this->in_real_elf())
+    return false;
+
   // If the symbol is used by a dynamic relocation, we need to add it.
   if (this->needs_dynsym_entry())
     return true;
@@ -2593,6 +2598,15 @@ Symbol_table::sized_finalize_symbol(Symbol* unsized_sym)
       return false;
     }
 
+  // If the symbol is only present on plugin files, the plugin decided we
+  // don't need it.
+  if (!sym->in_real_elf())
+    {
+      gold_assert(!sym->has_symtab_index());
+      sym->set_symtab_index(-1U);
+      return false;
+    }
+
   // Compute final symbol value.
   Compute_final_value_status status;
   Value_type value = this->compute_final_value(sym, &status);
This page took 0.035284 seconds and 4 git commands to generate.