aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2018-03-07 12:15:49 -0800
committerSriraman Tallam <tmsriram@google.com>2018-03-07 12:15:49 -0800
commit779bdadbea9a62e5a2203651703e15edd321b9d6 (patch)
treefc4c05a051c3234c9b62bb571edb766ffb27207a /gold/testsuite/Makefile.am
parentea005f31ca7a823680c70a75ae073bee52487859 (diff)
downloadgdb-779bdadbea9a62e5a2203651703e15edd321b9d6.zip
gdb-779bdadbea9a62e5a2203651703e15edd321b9d6.tar.gz
gdb-779bdadbea9a62e5a2203651703e15edd321b9d6.tar.bz2
New option -z,keep-text-section prefix.
This option does not merge certain text sections with prefixes .text.hot, .text.unlikely, .text.startup and .text.exit. * layout.cc (Layout::default_section_order): Check for text section prefixes. (Layout::text_section_name_mapping): New static member. (Layout::text_section_name_mapping_count): New static member. (Layout::match_section_name): New static function. (Layout::output_section_name): Check for text section prefixes. * layout.h (Output_section_order::ORDER_TEXT_HOT): New enum value. (Output_section_order::ORDER_TEXT_STARTUP): New enum value. (Output_section_order::ORDER_TEXT_EXIT): New enum value. (Output_section_order::ORDER_TEXT_UNLIKELY): New enum value. (Layout::text_section_name_mapping): New static member. (Layout::text_section_name_mapping_count): New static member. (Layout::match_section_name): New static function. * options.h (keep_text_section_prefix): New -z option. * testsuite/Makefile.am (keep_text_section_prefix): New test. * testsuite/Makefile.in: Regenerate. * testsuite/keep_text_section_prefix.cc: New test source. * testsuite/keep_text_section_prefix.sh: New test script.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r--gold/testsuite/Makefile.am12
1 files changed, 12 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index bb486ed..a732b53 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -354,6 +354,18 @@ text_unlikely_segment: text_unlikely_segment.o gcctestdir/ld
text_unlikely_segment_readelf.stdout: text_unlikely_segment
$(TEST_READELF) -Wl $< >$@
+check_SCRIPTS += keep_text_section_prefix.sh
+check_DATA += keep_text_section_prefix_readelf.stdout keep_text_section_prefix_nm.stdout
+MOSTLYCLEANFILES += keep_text_section_prefix
+keep_text_section_prefix.o: keep_text_section_prefix.cc
+ $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
+keep_text_section_prefix: keep_text_section_prefix.o gcctestdir/ld
+ $(CXXLINK) -Bgcctestdir/ -Wl,-z,keep-text-section-prefix keep_text_section_prefix.o
+keep_text_section_prefix_readelf.stdout: keep_text_section_prefix
+ $(TEST_READELF) -Wl $< >$@
+keep_text_section_prefix_nm.stdout: keep_text_section_prefix
+ $(TEST_NM) -n $< >$@
+
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