diff options
author | Ian Lance Taylor <ian@airs.com> | 2011-07-13 22:47:08 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2011-07-13 22:47:08 +0000 |
commit | 9446efde0abc5a3cff716eb2879bf99e3251165f (patch) | |
tree | bd6e9ba7326f0617dfa3acc50d0dab8d3fef2c0d /gold/testsuite | |
parent | 67f41397ce652a92b8160eb15de66c33b598a376 (diff) | |
download | gdb-9446efde0abc5a3cff716eb2879bf99e3251165f.zip gdb-9446efde0abc5a3cff716eb2879bf99e3251165f.tar.gz gdb-9446efde0abc5a3cff716eb2879bf99e3251165f.tar.bz2 |
* i386.cc (Target_i386::got_section): If -z now, make .got.plt a
relro section.
* x86_64.cc (Target_x86_64::got_section): Likewise.
* testsuite/Makefile.am (check_PROGRAMS): Add relro_now_test.
(relro_now_test_SOURCES): New variable.
(relro_now_test_DEPENDENCIES): New variable.
(relro_now_test_LDFLAGS): New variable.
(relro_now_test_LDADD): New variable.
(relro_now_test.so): New target.
* testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/testsuite')
-rw-r--r-- | gold/testsuite/Makefile.am | 8 | ||||
-rw-r--r-- | gold/testsuite/Makefile.in | 28 |
2 files changed, 31 insertions, 5 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index 0e9e3b1..c40da4c 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -1163,6 +1163,14 @@ relro_test_pic.o: relro_test.cc relro_test.stdout: relro_test.so $(TEST_READELF) -SlW relro_test.so > relro_test.stdout +check_PROGRAMS += relro_now_test +relro_now_test_SOURCES = relro_test_main.cc +relro_now_test_DEPENDENCIES = gcctestdir/ld relro_now_test.so +relro_now_test_LDFLAGS = -Bgcctestdir -Wl,-R,. -Wl,-z,relro -Wl,-z,now +relro_now_test_LDADD = relro_now_test.so +relro_now_test.so: gcctestdir/ld relro_test_pic.o + $(CXXLINK) -Bgcctestdir/ -shared -Wl,-z,relro -Wl,-z,now relro_test_pic.o + check_PROGRAMS += relro_strip_test relro_strip_test_SOURCES = relro_test_main.cc relro_strip_test_DEPENDENCIES = gcctestdir/ld relro_strip_test.so diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in index 5d8560e..2163cc9 100644 --- a/gold/testsuite/Makefile.in +++ b/gold/testsuite/Makefile.in @@ -258,7 +258,8 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6 ver_test_8 ver_test_9 \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_11 ver_test_12 \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_1 protected_2 \ -@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test relro_strip_test \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test relro_now_test \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_strip_test \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_script_test script_test_1 \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2 justsyms \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ binary_test script_test_3 \ @@ -662,6 +663,7 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest_a_OBJECTS) @GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_1$(EXEEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_2$(EXEEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test$(EXEEXT) \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_now_test$(EXEEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_strip_test$(EXEEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_script_test$(EXEEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_1$(EXEEXT) \ @@ -1223,6 +1225,11 @@ protected_1_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ protected_2_OBJECTS = $(am_protected_2_OBJECTS) protected_2_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(protected_2_LDFLAGS) $(LDFLAGS) -o $@ +@GCC_TRUE@@NATIVE_LINKER_TRUE@am_relro_now_test_OBJECTS = \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test_main.$(OBJEXT) +relro_now_test_OBJECTS = $(am_relro_now_test_OBJECTS) +relro_now_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(relro_now_test_LDFLAGS) $(LDFLAGS) -o $@ @GCC_TRUE@@NATIVE_LINKER_TRUE@am_relro_script_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test_main.$(OBJEXT) relro_script_test_OBJECTS = $(am_relro_script_test_OBJECTS) @@ -1612,10 +1619,10 @@ SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c basic_pie_test.c \ plugin_test_2.c plugin_test_3.c plugin_test_4.c \ plugin_test_5.c plugin_test_6.c plugin_test_7.c \ plugin_test_8.c $(protected_1_SOURCES) $(protected_2_SOURCES) \ - $(relro_script_test_SOURCES) $(relro_strip_test_SOURCES) \ - $(relro_test_SOURCES) $(script_test_1_SOURCES) \ - $(script_test_2_SOURCES) script_test_3.c \ - $(searched_file_test_SOURCES) start_lib_test.c \ + $(relro_now_test_SOURCES) $(relro_script_test_SOURCES) \ + $(relro_strip_test_SOURCES) $(relro_test_SOURCES) \ + $(script_test_1_SOURCES) $(script_test_2_SOURCES) \ + script_test_3.c $(searched_file_test_SOURCES) start_lib_test.c \ $(thin_archive_test_1_SOURCES) $(thin_archive_test_2_SOURCES) \ $(tls_phdrs_script_test_SOURCES) $(tls_pic_test_SOURCES) \ tls_pie_pic_test.c tls_pie_test.c $(tls_script_test_SOURCES) \ @@ -2231,6 +2238,10 @@ LDADD = libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@relro_test_DEPENDENCIES = gcctestdir/ld relro_test.so @GCC_TRUE@@NATIVE_LINKER_TRUE@relro_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. @GCC_TRUE@@NATIVE_LINKER_TRUE@relro_test_LDADD = relro_test.so +@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test_SOURCES = relro_test_main.cc +@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test_DEPENDENCIES = gcctestdir/ld relro_now_test.so +@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test_LDFLAGS = -Bgcctestdir -Wl,-R,. -Wl,-z,relro -Wl,-z,now +@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test_LDADD = relro_now_test.so @GCC_TRUE@@NATIVE_LINKER_TRUE@relro_strip_test_SOURCES = relro_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@relro_strip_test_DEPENDENCIES = gcctestdir/ld relro_strip_test.so @GCC_TRUE@@NATIVE_LINKER_TRUE@relro_strip_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. @@ -2905,6 +2916,9 @@ protected_1$(EXEEXT): $(protected_1_OBJECTS) $(protected_1_DEPENDENCIES) protected_2$(EXEEXT): $(protected_2_OBJECTS) $(protected_2_DEPENDENCIES) @rm -f protected_2$(EXEEXT) $(protected_2_LINK) $(protected_2_OBJECTS) $(protected_2_LDADD) $(LIBS) +relro_now_test$(EXEEXT): $(relro_now_test_OBJECTS) $(relro_now_test_DEPENDENCIES) + @rm -f relro_now_test$(EXEEXT) + $(relro_now_test_LINK) $(relro_now_test_OBJECTS) $(relro_now_test_LDADD) $(LIBS) relro_script_test$(EXEEXT): $(relro_script_test_OBJECTS) $(relro_script_test_DEPENDENCIES) @rm -f relro_script_test$(EXEEXT) $(relro_script_test_LINK) $(relro_script_test_OBJECTS) $(relro_script_test_LDADD) $(LIBS) @@ -3744,6 +3758,8 @@ protected_2.log: protected_2$(EXEEXT) @p='protected_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) relro_test.log: relro_test$(EXEEXT) @p='relro_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +relro_now_test.log: relro_now_test$(EXEEXT) + @p='relro_now_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) relro_strip_test.log: relro_strip_test$(EXEEXT) @p='relro_strip_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) relro_script_test.log: relro_script_test$(EXEEXT) @@ -4476,6 +4492,8 @@ uninstall-am: @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $< @GCC_TRUE@@NATIVE_LINKER_TRUE@relro_test.stdout: relro_test.so @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -SlW relro_test.so > relro_test.stdout +@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test.so: gcctestdir/ld relro_test_pic.o +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared -Wl,-z,relro -Wl,-z,now relro_test_pic.o @GCC_TRUE@@NATIVE_LINKER_TRUE@relro_strip_test.so: relro_test.so @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_STRIP) -o $@ $< @GCC_TRUE@@NATIVE_LINKER_TRUE@relro_script_test.so: gcctestdir/ld relro_script_test.t relro_test_pic.o |