Map ".text.hot" and ".text.unlikely" input section prefixes to separate output sections.
Ian Lance Taylor
iant@google.com
Tue Sep 13 22:32:00 GMT 2011
Sriraman Tallam <tmsriram@google.com> 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
Input_section_list.
Ian
More information about the Binutils
mailing list