diff options
author | Sriraman Tallam <tmsriram@google.com> | 2018-03-07 12:15:49 -0800 |
---|---|---|
committer | Sriraman Tallam <tmsriram@google.com> | 2018-03-07 12:15:49 -0800 |
commit | 779bdadbea9a62e5a2203651703e15edd321b9d6 (patch) | |
tree | fc4c05a051c3234c9b62bb571edb766ffb27207a /gold/testsuite/Makefile.in | |
parent | ea005f31ca7a823680c70a75ae073bee52487859 (diff) | |
download | gdb-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.in')
-rw-r--r-- | gold/testsuite/Makefile.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in index ec851d5..6f61eae 100644 --- a/gold/testsuite/Makefile.in +++ b/gold/testsuite/Makefile.in @@ -101,6 +101,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ text_section_grouping.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ section_sorting_name.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ text_unlikely_segment.sh \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ keep_text_section_prefix.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_preemptible_functions_test.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_string_merge_test.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_sht_rel_addend_test.sh \ @@ -129,6 +130,8 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ text_section_no_grouping.stdout \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ section_sorting_name.stdout \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ text_unlikely_segment_readelf.stdout \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ keep_text_section_prefix_readelf.stdout \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ keep_text_section_prefix_nm.stdout \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_preemptible_functions_test.stdout \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_string_merge_test.stdout \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_sht_rel_addend_test.stdout \ @@ -155,6 +158,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ text_section_no_grouping \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ section_sorting_name \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ text_unlikely_segment \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ keep_text_section_prefix \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_virtual_function_folding_test \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_virtual_function_folding_test.map \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_preemptible_functions_test \ @@ -5233,6 +5237,8 @@ section_sorting_name.sh.log: section_sorting_name.sh @p='section_sorting_name.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) text_unlikely_segment.sh.log: text_unlikely_segment.sh @p='text_unlikely_segment.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +keep_text_section_prefix.sh.log: keep_text_section_prefix.sh + @p='keep_text_section_prefix.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) icf_preemptible_functions_test.sh.log: icf_preemptible_functions_test.sh @p='icf_preemptible_functions_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) icf_string_merge_test.sh.log: icf_string_merge_test.sh @@ -6108,6 +6114,14 @@ uninstall-am: @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,-z,text-unlikely-segment text_unlikely_segment.o @GCC_TRUE@@NATIVE_LINKER_TRUE@text_unlikely_segment_readelf.stdout: text_unlikely_segment @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -Wl $< >$@ +@GCC_TRUE@@NATIVE_LINKER_TRUE@keep_text_section_prefix.o: keep_text_section_prefix.cc +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $< +@GCC_TRUE@@NATIVE_LINKER_TRUE@keep_text_section_prefix: keep_text_section_prefix.o gcctestdir/ld +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,-z,keep-text-section-prefix keep_text_section_prefix.o +@GCC_TRUE@@NATIVE_LINKER_TRUE@keep_text_section_prefix_readelf.stdout: keep_text_section_prefix +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -Wl $< >$@ +@GCC_TRUE@@NATIVE_LINKER_TRUE@keep_text_section_prefix_nm.stdout: keep_text_section_prefix +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_NM) -n $< >$@ @GCC_TRUE@@NATIVE_LINKER_TRUE@icf_virtual_function_folding_test.o: icf_virtual_function_folding_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIE -g -o $@ $< @GCC_TRUE@@NATIVE_LINKER_TRUE@icf_virtual_function_folding_test: icf_virtual_function_folding_test.o gcctestdir/ld |