summaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2012-12-19 02:55:15 +0000
committerSriraman Tallam <tmsriram@google.com>2012-12-19 02:55:15 +0000
commit52d9b4b2c19a0c421a291b24529462d7bc8cac8e (patch)
tree050e11e7c954cf6bf52c37bcc870750cac14a8cc /gold/testsuite/Makefile.am
parent20f95cf8afd097e7320237e68333ce5f65c851dc (diff)
downloadbinutils-redhat-52d9b4b2c19a0c421a291b24529462d7bc8cac8e.tar.gz
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.
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 c5c8a99b4c..745e13d091 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -250,6 +250,16 @@ final_layout: final_layout.o final_layout_sequence.txt gcctestdir/ld
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
+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_grouping.stdout: text_section_grouping
+ $(TEST_NM) -n --synthetic text_section_grouping > text_section_grouping.stdout
+
check_PROGRAMS += icf_virtual_function_folding_test
MOSTLYCLEANFILES += icf_virtual_function_folding_test
icf_virtual_function_folding_test.o: icf_virtual_function_folding_test.cc