mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
Group text sections with prefixes .text.unlikely,.text.hot and .text.startup
by default. 2012-12-18 Sriraman Tallam <tmsriram@google.com> * 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.
This commit is contained in:
@ -552,6 +552,11 @@ class Layout
|
||||
// Maps section SECN to SEGMENT s.
|
||||
void
|
||||
insert_section_segment_map(Const_section_id secn, Unique_segment_info *s);
|
||||
|
||||
// By default, gold groups input sections with certain prefixes. This
|
||||
// function returns true if this section name NAME contains such a prefix.
|
||||
bool
|
||||
is_section_name_prefix_grouped(const char *name);
|
||||
|
||||
bool
|
||||
is_section_ordering_specified()
|
||||
|
Reference in New Issue
Block a user