+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
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;
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);