This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][GOLD] Last part of EXIDX fixup.
- From: Ian Lance Taylor <iant at google dot com>
- To: Doug Kwan (éæå) <dougkwan at google dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Tue, 26 Jan 2010 11:51:49 -0800
- Subject: Re: [PATCH][GOLD] Last part of EXIDX fixup.
- References: <498552561001222351s63248cefm185d463616b31946@mail.gmail.com>
"Doug Kwan (éæå)" <dougkwan@google.com> writes:
> 2010-01-22 Doug Kwan <dougkwan@google.com>
>
> * arm.cc (set): Include.
> (class Arm_exidx_fixup): Change type of last_input_section_ to const
> pointer type.
> (Arm_output_section::Text_section_list): New type.
> (Arm_output_section::append_text_sections_to_list): New method.
> (Arm_output_section::fix_exidx_coverage): Ditto.
> (Arm_relobj::Arm_relobj): Initialize exidx_section_map_.
> (Arm_relobj::convert_input_section_to_relaxed_section): Use
> Relobj::set_section_offset() instead of
> Sized_relobj::invalidate_section_offset().
> (Arm_relobj::section_needs_reloc_stub_scanning): Add an extra
> parameter for section headers. Ignore relocation sections for
> unallocated sections and EXIDX sections.
> (Target_arm::fix_exidx_coverage): New method.
> (Target_arm::output_section_address_less_than): New type.
> (Arm_exidx_fixup::add_exidx_cantunwind_as_needed): Use index of the
> linked text section instead of the EXIDX section.
> (Arm_output_section::create_stub_group): Add an assertion to check
> that this is not an EXIDX output section.
> (Arm_output_section::append_text_sections_to_list): New method.
> (Arm_output_section::fix_exidx_coverage): Ditto.
> (Arm_relobj::scan_sections_for_stubs): Adjust call to
> Arm_relobj::section_needs_reloc_stub_scanning.
> (Target_arm::do_relax): Fix EXIDX output section coverage in the
> first pass.
> (Target_arm::fix_exidx_coverage): New method.
> * object.h (Relobj::set_output_section): New method.
> (Sized_relobj::invalidate_section_offset): Remove method.
> (Sized_relobj::do_invalidate_section_offset): Remove method.
> (Sized_relobj::do_set_section_offset): Handle offset value -1.
> @@ -1443,7 +1457,7 @@ class Arm_relobj : public Sized_relobj<3
> {
> // The stubs have relocations and we need to process them after writing
> // out the stubs. So relocation now must follow section write.
> - this->invalidate_section_offset(shndx);
> + this->set_section_offset(shndx, -1);
> this->set_relocs_must_follow_section_writes();
You should write -1ULL here, to ensure the right value.
> + // Get remove all input sections.
> + uint64_t address = this->address();
> + typedef std::list<Simple_input_section> Simple_input_section_list;
> + Simple_input_section_list input_sections;
> + this->reset_address_and_file_offset();
> + this->get_input_sections(address, std::string(""), &input_sections);
That comment needs to be fixed somehow.
This is OK with those changes.
Thanks.
Ian