diff options
author | Ian Lance Taylor <ian@airs.com> | 2012-12-21 06:24:31 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2012-12-21 06:24:31 +0000 |
commit | edcac0c105556029774320bc8288beb472e999b5 (patch) | |
tree | fe3f5136d7ebc3d5df8dd65aa0bc20cd3cee3cb5 /gold/layout.h | |
parent | 600e715a7ba9eb29f781efdf35fb1627879a2e83 (diff) | |
download | gdb-edcac0c105556029774320bc8288beb472e999b5.zip gdb-edcac0c105556029774320bc8288beb472e999b5.tar.gz gdb-edcac0c105556029774320bc8288beb472e999b5.tar.bz2 |
* layout.cc (Layout::special_ordering_of_input_section): New
function.
(Layout::layout): If input section requires special ordering, must
sort input sections.
(Layout::make_output_section): May sort .text input sections.
(Layout::is_section_name_prefix_grouped): Remove.
* layout.h (class Layout): Declare
special_ordering_of_input_section. Don't declare
is_section_name_prefix_grouped.
* output.cc (Output_section::add_input_section): Revert last
change.
(Output_section::Input_section_sort::match_file_name): Don't crash
if called on output section data.
(Output_section::Input_section_sort_compare): Sort based on
special ordering.
(Output_section::Input_section_sort_section_order_index_compare):
Revert last patch.
(Output_section::sort_attached_input_sections): Likewise.
Diffstat (limited to 'gold/layout.h')
-rw-r--r-- | gold/layout.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gold/layout.h b/gold/layout.h index 71f1aa7..6da9607 100644 --- a/gold/layout.h +++ b/gold/layout.h @@ -553,11 +553,14 @@ class Layout 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); - + // Some input sections require special ordering, for compatibility + // with GNU ld. Given the name of an input section, return -1 if it + // does not require special ordering. Otherwise, return the index + // by which it should be ordered compared to other input sections + // that require special ordering. + static int + special_ordering_of_input_section(const char* name); + bool is_section_ordering_specified() { return this->section_ordering_specified_; } |