This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Group static constructors and destructors in specific subsections


> I am not sure how to update gold - I basically copied existing code in binutils
> for .text.unlikely group in GNU LD linker script, but I think gold is doing
> independent decisions somewhere.

Gold doesn't have a default linker script. The code that handles the
default section name mappings is Layout::output_section_name() in
gold/layout.cc. If you add a couple of entries to the mapping array
Layout::section_name_mapping[], you can easily change gold to group
.text.startup and .text.exit sections together without mapping them
all into .text. You can tweak the ordering of the output sections, if
you want to, in Layout::default_section_order().

-cary


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