diff options
author | Cary Coutant <ccoutant@gmail.com> | 2016-12-27 20:50:47 -0800 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2016-12-27 20:50:56 -0800 |
commit | b733bcb7f58c42e0e0d94a3f266a4193030e5f3a (patch) | |
tree | 3ad325d2805aecf4a3e943d47c33f88ca6a24bf6 /gold/testsuite/Makefile.am | |
parent | 7ff34266fd831f828286e556f9cd681c42c0412c (diff) | |
download | gdb-b733bcb7f58c42e0e0d94a3f266a4193030e5f3a.zip gdb-b733bcb7f58c42e0e0d94a3f266a4193030e5f3a.tar.gz gdb-b733bcb7f58c42e0e0d94a3f266a4193030e5f3a.tar.bz2 |
Place copy relocations in .dynbss when target is read-only.
gold/
PR ld/20995
* copy-relocs.cc (Copy_relocs::make_copy_reloc): Use .dynbss for
read-only data when linking with -z relro.
* copy-relocs.h (Copy_relocs::dynrelro_): New data member.
* testsuite/Makefile.am (copy_test_relro): New test case.
* testsuite/Makefile.in: Regenerate.
* testsuite/copy_test_relro.cc: New source file.
* testsuite/copy_test_relro_1.cc: New source file.
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 6a882ea..d9480ab 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -858,6 +858,16 @@ copy_test_2_pic.o: copy_test_2.cc copy_test_2.so: gcctestdir/ld copy_test_2_pic.o $(CXXLINK) -Bgcctestdir/ -shared copy_test_2_pic.o +check_PROGRAMS += copy_test_relro +copy_test_relro_SOURCES = copy_test_relro.cc +copy_test_relro_DEPENDENCIES = gcctestdir/ld copy_test_relro_1.so +copy_test_relro_LDFLAGS = -Bgcctestdir/ -Wl,-R,. -Wl,-z,relro +copy_test_relro_LDADD = copy_test_relro_1.so +copy_test_relro_1_pic.o: copy_test_relro_1.cc + $(CXXCOMPILE) -c -fpic -o $@ $< +copy_test_relro_1.so: gcctestdir/ld copy_test_relro_1_pic.o + $(CXXLINK) -Bgcctestdir/ -shared -Wl,-z,relro copy_test_relro_1_pic.o + if !DEFAULT_TARGET_POWERPC check_SCRIPTS += copy_test_protected.sh check_DATA += copy_test_protected.err |