This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Map ".text.hot" and ".text.unlikely" input section prefixes to separate output sections.
- From: Ian Lance Taylor <iant at google dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: binutils <binutils at sourceware dot org>, Cary Coutant <ccoutant at google dot com>
- Date: Tue, 18 Dec 2012 17:39:43 -0800
- Subject: Re: Map ".text.hot" and ".text.unlikely" input section prefixes to separate output sections.
- References: <CAAs8HmygtSkVh3v4dz2hBTzS1AH-rLbBkTDJ-hVkzENC2sqQZg@mail.gmail.com> <mcrlitsdqf3.fsf@coign.corp.google.com> <CAAs8HmxS9v50Bzw1srgUaC+8dCekCjv_H5_kyAi3Z5TDB8TkGg@mail.gmail.com> <CAKOQZ8zm-uHvKBm-DaSA99TTuzob0+XV8NkLM82BJ4VdS7aYHw@mail.gmail.com> <20121119225222.GK3056@bubble.grove.modra.org> <CAKOQZ8zoxKijcBbM583845u4vtW29dxFZVyZt1U+f_p1B6GJWg@mail.gmail.com> <CAAs8Hmzs=TYDcnHPvD2nFgKu82UW7gddiQQVLtxt555bu_uBPQ@mail.gmail.com> <CAKOQZ8z187ACBOcxHBnMyDC=7ADeqjaN3p427uKcnU0eDRwg7g@mail.gmail.com> <CAAs8Hmxvh7x-+qqVcGPpaW7eR50x_wPLp0M=WqCuWBRC7p7BOA@mail.gmail.com>
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