This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, This mainly fixes a problem in which section offsets of input sections in an output section are not updated during relaxation. If one of the input sections is relaxed, all the input sections after that need to have their section offsets updated. I took a simpler approach of updating all the section offsets. This patch also contains a few unrelated changes that are used by the EXIDX code. I renamed Output_section::add_input_section_for_script() to Output_section::add_simple_input_section() since it is also used by the EXIDX fix-up and the method is not really for scripts only. I also added Output_section::discard_states() method to discard the currently saved states. The EXIDX fix-up needs to modify many saved states. So it is easier to just discard the saved states and re-take another snapshot after the fix-up. -Doug 2010-01-22 Doug Kwan <dougkwan@google.com> * arm.cc (Target_arm::do_relax): Record an output section for section offset adjustment it contains any stub table that has changed. * layout.cc (Layout::clean_up_after_relaxation): Adjust section offsets in an output section if necessary. * output.cc (Output_section::Output_section): Initialize section_offsets_need_adjustments_. (Output_section::add_input_section_for_script): Renamed to Output_section::add_simple_input_section. (Output_section::save_states): Add a comment. (Output_section::discard_states): New method defintion. (Output_section::adjust_section_offsets): Same. * output.h (Output_section::add_input_section_for_script): Renamed to Output_section::add_simple_input_section. (Output_section::discard_states): New method declaration. (Output_section::adjust_section_offsets): Same. (Output_section::section_offsets_need_adjustment, Output_section::set_section_offsets_need_adjustment): New method definitions. (Output_section::section_offsets_need_adjustment_): New data member. * script-sections.cc (Output_section_element_input::set_section_address): Adjust code for renaming of Output_section::add_input_section_for_script. (Orphan_output_section::set_section_address): Same.
Attachment:
patch-output.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |