summaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2013-05-30 23:01:11 +0000
committerCary Coutant <ccoutant@google.com>2013-05-30 23:01:11 +0000
commit86091e7d8e666fa4edddaf6f328ec2e7bd315172 (patch)
tree42dc0d7c37ada9ea2cd0a8c641004cc915fe584a /gold/testsuite/Makefile.am
parent5f906e3cfeff8e40a750c9ab35bc306bd2e78edf (diff)
downloadbinutils-redhat-86091e7d8e666fa4edddaf6f328ec2e7bd315172.tar.gz
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.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r--gold/testsuite/Makefile.am10
1 files changed, 10 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 4936e14887..bccf54d3d3 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -273,6 +273,16 @@ text_section_grouping.stdout: text_section_grouping
text_section_no_grouping.stdout: text_section_no_grouping
$(TEST_NM) -n --synthetic text_section_no_grouping > text_section_no_grouping.stdout
+check_SCRIPTS += section_sorting_name.sh
+check_DATA += section_sorting_name.stdout
+MOSTLYCLEANFILES += section_sorting_name
+section_sorting_name.o: section_sorting_name.cc
+ $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
+section_sorting_name: section_sorting_name.o gcctestdir/ld
+ $(CXXLINK) -Bgcctestdir/ -Wl,--sort-section=name section_sorting_name.o
+section_sorting_name.stdout: section_sorting_name
+ $(TEST_NM) -n --synthetic section_sorting_name > section_sorting_name.stdout
+
check_PROGRAMS += icf_virtual_function_folding_test
MOSTLYCLEANFILES += icf_virtual_function_folding_test icf_virtual_function_folding_test.map
icf_virtual_function_folding_test.o: icf_virtual_function_folding_test.cc