aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/elf.exp
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-12-28 17:04:15 +1030
committerAlan Modra <amodra@gmail.com>2016-12-28 22:10:38 +1030
commit9acc85a62eb76c270724bba15c889d2d05567b6a (patch)
tree2f98cec208e57b60f245c4eac6bb4b71274d73e8 /ld/testsuite/ld-elf/elf.exp
parentb733bcb7f58c42e0e0d94a3f266a4193030e5f3a (diff)
downloadgdb-9acc85a62eb76c270724bba15c889d2d05567b6a.zip
gdb-9acc85a62eb76c270724bba15c889d2d05567b6a.tar.gz
gdb-9acc85a62eb76c270724bba15c889d2d05567b6a.tar.bz2
Use dynrelro for symbols in relro sections too
PR ld/20995 bfd/ * elflink.c (elf_link_add_object_symbols): Mark relro sections in dynamic objects SEC_READONLY. ld/ * testsuite/ld-elf/pr20995c.s: New test file. * testsuite/ld-elf/pr20995-2so.r: Likewise. * testsuite/ld-elf/elf.exp: Run it.
Diffstat (limited to 'ld/testsuite/ld-elf/elf.exp')
-rw-r--r--ld/testsuite/ld-elf/elf.exp12
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 9b1fbeb..47f1383 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -134,6 +134,12 @@ if { [check_shared_lib_support] } then {
"-shared" "" ""
{pr20995b.s} {} "pr20995.so"}
}
+ setup_xfail "tic6x-*-*"
+ run_ld_link_tests {
+ {"Build pr20995-2.so"
+ "-shared -z relro" "" ""
+ {pr20995c.s} {{readelf {-l --wide} pr20995-2so.r}} "pr20995-2.so"}
+ }
# These targets don't copy dynamic variables into .bss.
setup_xfail "alpha-*-*" "bfin-*-*" "ia64-*-*" "xtensa-*-*"
run_ld_link_tests {
@@ -141,6 +147,12 @@ if { [check_shared_lib_support] } then {
"" "tmpdir/pr20995.so" ""
{pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995"}
}
+ setup_xfail "alpha-*-*" "bfin-*-*" "ia64-*-*" "xtensa-*-*"
+ run_ld_link_tests {
+ {"pr20995-2"
+ "" "tmpdir/pr20995-2.so" ""
+ {pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995-2"}
+ }
}
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]