2013-05-30 Alexander Ivchenko <alexander.ivchenko@intel.com>
authorCary Coutant <ccoutant@google.com>
Thu, 30 May 2013 23:01:11 +0000 (23:01 +0000)
committerCary Coutant <ccoutant@google.com>
Thu, 30 May 2013 23:01:11 +0000 (23:01 +0000)
commit6934001a98509d5f40ececbd9aa793b8969e27a3
treee6b29c40e30acd5c3601df19a9fc5609fd618bd4
parent067ec077d717e716b0dba87b9ebfa25074cd5453
2013-05-30  Alexander Ivchenko  <alexander.ivchenko@intel.com>
    Sriraman Tallam  <tmsriram@google.com>

* options.h (sort_section): New option.
* output.h (Input_section_sort_section_prefix_special_ordering_compare):
Rename from Input_section_sort_section_name_special_ordering_compare.
(Input_section_sort_section_name_compare): New struct.
* output.cc (Output_section::Input_section_sort_section_name_compare::
operator()): New function.
(Output_section::sort_attached_input_sections): Use new sort function
for .text if --sort-section=name is specified.
* layout.cc (Layout::make_output_section):
Add sorting by name when --sort-section=name is specified.
* testsuite/Makefile.am (text_section_grouping): Test option
--sort-section=name.
* testsuite/Makefile.in: Regenerate.
* testsuite/section_sorting_name.cc: New file.
* testsuite/section_sorting_name.sh: New file.
gold/ChangeLog
gold/layout.cc
gold/options.h
gold/output.cc
gold/output.h
gold/testsuite/Makefile.am
gold/testsuite/Makefile.in
gold/testsuite/section_sorting_name.cc [new file with mode: 0644]
gold/testsuite/section_sorting_name.sh [new file with mode: 0755]