diff options
author | Sriraman Tallam <tmsriram@google.com> | 2017-10-20 11:00:28 -0700 |
---|---|---|
committer | Sriraman Tallam <tmsriram@google.com> | 2017-10-20 11:00:28 -0700 |
commit | 3b4190ccb31be262a5aac78238e6d659746f1f0f (patch) | |
tree | 462cab8fff8edfd52d66b6e46e73620c88ea1ea7 /gold/testsuite/Makefile.am | |
parent | f3012016f008030b48597b578a5fb1e550907374 (diff) | |
download | binutils-3b4190ccb31be262a5aac78238e6d659746f1f0f.zip binutils-3b4190ccb31be262a5aac78238e6d659746f1f0f.tar.gz binutils-3b4190ccb31be262a5aac78238e6d659746f1f0f.tar.bz2 |
New gold linker option -z,text-unlikely-segment.
2017-10-04 Sriraman Tallam <tmsriram@google.com>
* options.h (-z,text_unlikely_segment): New option.
* layout.cc (Layout::layout): Create new output section
for .text.unlikely sections with the new option.
(Layout::segment_precedes): Check for the new option
when segment flags match.
* testsuite/text_unlikely_segment.cc: New test source.
* testsuite/text_unlikely_segment.sh: New test script.
* testsuite/Makefile.am (text_unlikely_segment): New test.
* testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r-- | gold/testsuite/Makefile.am | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index 8eca3d8..d9a0669 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -340,6 +340,16 @@ section_sorting_name: section_sorting_name.o gcctestdir/ld section_sorting_name.stdout: section_sorting_name $(TEST_NM) -n --synthetic section_sorting_name > section_sorting_name.stdout +check_SCRIPTS += text_unlikely_segment.sh +check_DATA += text_unlikely_segment_readelf.stdout +MOSTLYCLEANFILES += text_unlikely_segment +text_unlikely_segment.o: text_unlikely_segment.cc + $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $< +text_unlikely_segment: text_unlikely_segment.o gcctestdir/ld + $(CXXLINK) -Bgcctestdir/ -Wl,-z,text-unlikely-segment text_unlikely_segment.o +text_unlikely_segment_readelf.stdout: text_unlikely_segment + $(TEST_READELF) -Wl $< >$@ + 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 |