summaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2013-01-24 18:49:54 +0000
committerSriraman Tallam <tmsriram@google.com>2013-01-24 18:49:54 +0000
commitbd177e608fe5eab4dbe6ff3f27708200e55d3b00 (patch)
treea7457142037cf4bafdc3a4f1abf8488c89ab1acb /gold/testsuite/Makefile.am
parentf504adc7fd62d0455f949cbf174d8e332deb73ba (diff)
downloadbinutils-redhat-bd177e608fe5eab4dbe6ff3f27708200e55d3b00.tar.gz
Default text reordering fix with a flag to turn it off.
2013-01-24 Sriraman Tallam <tmsriram@google.com> * layout.cc (Layout::layout): Check for option text_reorder. (Layout::make_output_section): Ditto. * options.h (text_reorder): New option. * output.cc (Input_section_sort_compare): Remove special ordering of section names. (Output_section:: Input_section_sort_section_name_special_ordering_compare:: operator()): New function. (Output_section::sort_attached_input_sections): Use new sort function for .text. * output.h (Input_section_sort_section_name_special_ordering_compare): New struct. * testsuite/Makefile.am (text_section_grouping): Test option --no-text-reorder * testsuite/Makefile.in: Regenerate. * testsuite/text_section_grouping.sh: Check order of functions without default text reordering.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r--gold/testsuite/Makefile.am10
1 files changed, 7 insertions, 3 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index fa1161f3b5..499dba6508 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -259,14 +259,18 @@ final_layout.stdout: final_layout
$(TEST_NM) -n --synthetic final_layout > final_layout.stdout
check_SCRIPTS += text_section_grouping.sh
-check_DATA += text_section_grouping.stdout
-MOSTLYCLEANFILES += text_section_grouping
+check_DATA += text_section_grouping.stdout text_section_no_grouping.stdout
+MOSTLYCLEANFILES += text_section_grouping text_section_no_grouping
text_section_grouping.o: text_section_grouping.cc
$(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
text_section_grouping: text_section_grouping.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ text_section_grouping.o
+text_section_no_grouping: text_section_grouping.o gcctestdir/ld
+ $(CXXLINK) -Bgcctestdir/ -Wl,--no-text-reorder text_section_grouping.o
text_section_grouping.stdout: text_section_grouping
- $(TEST_NM) -n --synthetic text_section_grouping > text_section_grouping.stdout
+ $(TEST_NM) -n --synthetic text_section_grouping > text_section_grouping.stdout
+text_section_no_grouping.stdout: text_section_no_grouping
+ $(TEST_NM) -n --synthetic text_section_no_grouping > text_section_no_grouping.stdout
check_PROGRAMS += icf_virtual_function_folding_test
MOSTLYCLEANFILES += icf_virtual_function_folding_test icf_virtual_function_folding_test.map