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: Map ".text.hot" and ".text.unlikely" input section prefixes to separate output sections.


On Tue, Nov 20, 2012 at 7:08 PM, Sriraman Tallam <tmsriram@google.com> wrote:

>	* layout.cc (Layout::is_section_name_prefix_grouped): New function.
>	* layout.h (Layout::is_section_name_prefix_grouped): New function.
>	* output.cc (Output_section::add_input_section): Check if section
>	name contains special prefix.  Keep input sections to sort such
>	sections.
>	(Output_section::Input_section_sort_section_order_index_compare
>	 ::operator()): Group sections according to prefixes.
>	* (Output_section::sort_attached_input_sections): Add condition
>	to Input_section_entry constructor call.
>	* testsuite/Makefile.am (text_section_grouping): New test.
>	* testsuite/Makefile.in: Regenerate.
>	* testsuite/text_section_grouping.cc: New file.
>	* testsuite/text_section_grouping.sh: New file.


> +  // If it is a text section use the following order:
> +  // .text.unlikely, .text.startup, .text.hot.
> +  const char* section_prefix [] =
> +  {
> +    ".text.unlikely",
> +    ".text.startup",
> +    ".text.hot"
> +  };

Please mention in the comment that this should match
Layout::is_section_name_prefix_grouped.

This is OK with that change.

Thanks, and sorry for the long delay.

Ian


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