aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r--gold/testsuite/Makefile.am8
1 files changed, 5 insertions, 3 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 74621e9..e5f445a 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -246,13 +246,15 @@ icf_safe_so_test_2.stdout: icf_safe_so_test
check_SCRIPTS += final_layout.sh
check_DATA += final_layout.stdout
-MOSTLYCLEANFILES += final_layout final_layout_sequence.txt
+MOSTLYCLEANFILES += final_layout final_layout_sequence.txt final_layout_script.lds
final_layout.o: final_layout.cc
$(CXXCOMPILE) -O0 -c -ffunction-sections -fdata-sections -g -o $@ $<
final_layout_sequence.txt:
(echo "*_Z3barv*" && echo ".text._Z3bazv" && echo "*_Z3foov*" && echo "*global_varb*" && echo "*global_vara*" && echo "*global_varc*") > final_layout_sequence.txt
-final_layout: final_layout.o final_layout_sequence.txt gcctestdir/ld
- $(CXXLINK) -Bgcctestdir/ -Wl,--section-ordering-file,final_layout_sequence.txt final_layout.o
+final_layout_script.lds:
+ (echo "SECTIONS { .text : { *(.text*) } .bss : { *(.bss*) } }") > final_layout_script.lds
+final_layout: final_layout.o final_layout_sequence.txt final_layout_script.lds gcctestdir/ld
+ $(CXXLINK) -Bgcctestdir/ -Wl,--section-ordering-file,final_layout_sequence.txt -Wl,-T,final_layout_script.lds final_layout.o
final_layout.stdout: final_layout
$(TEST_NM) -n --synthetic final_layout > final_layout.stdout