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]

Re: Fix bug in plugin section ordering infrastructure when layout is deferred.


Updating patch by adding a test case.

	* layout.h (section_order_map_): New member.
	(get_section_order_map): New member function.
	* output.cc (Output_section::add_input_section): Check for patterns
	only when --section-ordering-file is specified.
	* gold.cc (queue_middle_tasks): Delay updating order of sections till
	output_sections have been formed.
	* layout.cc (Layout_Layout): Initialize section_order_map_.
	* plugin.cc (update_section_order): Store order in order_map. Do not
	update the order.
	* testsuite/Makefile.am: Add test case for plugin_final_layout.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/plugin_section_order.c: New file.
	* testsuite/plugin_final_layout.cc: New file.
	* testsuite/plugin_final_layout.sh: New file.

On Wed, Sep 28, 2011 at 11:02 AM, Sriraman Tallam <tmsriram@google.com> wrote:
> Hi,
>
> ? Currently, the plugin section ordering infrastructure does not do
> the right thing when layout is deferred. This happens when garbage
> collection or icf is done. The --section-ordering-file works fine
> because it updates section order only after layout is done. ?This
> patch fixes this problem by delaying the update of the section order
> of input sections until layout has all the output sections.
>
> Thanks,
> -Sri.
>
> ? ? ? ?* layout.h (section_order_map_): New member.
> ? ? ? ?(get_section_order_map): New member function.
> ? ? ? ?* output.cc (Output_section::add_input_section): Check for patterns
> ? ? ? ?only when --section-ordering-file is specified.
> ? ? ? ?* gold.cc (queue_middle_tasks): Delay updating order of sections till
> ? ? ? ?output_sections have been formed.
> ? ? ? ?* layout.cc (Layout_Layout): Initialize section_order_map_.
> ? ? ? ?* plugin.cc (update_section_order): Store order in order_map. Do not
> ? ? ? ?update the order.
>

Attachment: gold_patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]