diff options
author | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2011-02-18 14:55:33 +0000 |
---|---|---|
committer | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2011-02-18 14:55:33 +0000 |
commit | badc813953563b5539ce2974242b9c3d3860adab (patch) | |
tree | 62dd8d79b36d9abee3140b4a86cd505c7841b770 /gold/symtab.cc | |
parent | 13163d8050012d1c79f1ec764c1f621aa47f1c27 (diff) | |
download | gdb-badc813953563b5539ce2974242b9c3d3860adab.zip gdb-badc813953563b5539ce2974242b9c3d3860adab.tar.gz gdb-badc813953563b5539ce2974242b9c3d3860adab.tar.bz2 |
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.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index cb650fb..d4ac297 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -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); |