diff options
author | Doug Kwan <dougkwan@google.com> | 2009-12-17 00:00:26 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2009-12-17 00:00:26 +0000 |
commit | d6344fb5ba8bfe0219f91c52e296707dbcdb07e3 (patch) | |
tree | 2a6c65ec60d4c8c400166139e1dc436368182b1f /gold/symtab.cc | |
parent | 21f8908e380ed50e16a153aae25ba9cffd6f28af (diff) | |
download | gdb-d6344fb5ba8bfe0219f91c52e296707dbcdb07e3.zip gdb-d6344fb5ba8bfe0219f91c52e296707dbcdb07e3.tar.gz gdb-d6344fb5ba8bfe0219f91c52e296707dbcdb07e3.tar.bz2 |
2009-12-16 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_relobj::scan_sections_for_stubs): Exclude ICF-eliminated
sections.
* object.cc (Sized_relobj::do_finalize_local_symbols): Handle
relaxed input sections.
* output.cc (Output_section::find_relaxed_input_section): Change
return type to Output_relaxed_input_section pointer. Adjust code
for new type of relaxed_input_section_map_.
* output.h (Output_section::find_relaxed_input_section): Change
return type to Output_relaxed_input_section pointer.
(Output_section::Output_relaxed_input_section_by_input_section_map):
New type.
(Output_section::relaxed_input_section_map_): Change type to
Output_section::Output_relaxed_input_section_by_input_section_map.
* symtab.cc (Symbol_table::compute_final_value): Handle relaxed
input section.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 7e8a890..8cd4a40 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -2413,7 +2413,6 @@ Symbol_table::compute_final_value( { Relobj* relobj = static_cast<Relobj*>(symobj); Output_section* os = relobj->output_section(shndx); - uint64_t secoff64 = relobj->output_section_offset(shndx); if (this->is_section_folded(relobj, shndx)) { @@ -2423,11 +2422,17 @@ Symbol_table::compute_final_value( shndx); gold_assert(folded.first != NULL); Relobj* folded_obj = reinterpret_cast<Relobj*>(folded.first); - os = folded_obj->output_section(folded.second); + unsigned folded_shndx = folded.second; + + os = folded_obj->output_section(folded_shndx); gold_assert(os != NULL); - secoff64 = folded_obj->output_section_offset(folded.second); + + // Replace (relobj, shndx) with canonical ICF input section. + shndx = folded_shndx; + relobj = folded_obj; } + uint64_t secoff64 = relobj->output_section_offset(shndx); if (os == NULL) { bool static_or_reloc = (parameters->doing_static_link() || |