This is the mail archive of the
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, 13 Sep 2011 15:32:32 -0700
- Subject: Re: Map ".text.hot" and ".text.unlikely" input section prefixes to separate output sections.
- References: <CAAs8HmygtSkVh3v4dz2hBTzS1AH-rLbBkTDJ-hVkzENC2sqQZg@mail.gmail.com>
Sriraman Tallam <firstname.lastname@example.org> writes:
> Sections prefixed with ".text.hot", ".text.unlikely" and
> ".text.startup" should map to separate output sections so that they
> can be grouped together. The following simple patch does this. Alright
> to submit?
The GNU linker puts all .text.hot input sections into the .text output
section. It just groups them together. I would prefer to do that in
gold, too. Your patch would create a .text.hot output section, which is
not what I would like to see.
Ideally gold should group all input sections with the same name
together, regardless of what output section they are going to. I
believe this can be done in Output_section::add_input_section if we
preserve the name in Input_section_list. The main drawback is that this
may mean giving up on the current optimization of not building an