aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-04-28 12:29:29 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-04-28 12:35:18 -0700
commitd6f48aed23d1004a4ed8ab3b2742b0bf7c838c1c (patch)
tree32c17eb64d15eb5dd02d96ae5610ebb49f1dc90e /ld/testsuite/ld-x86-64
parent428544e8ae6252a615a3100889f3df7d2c5483c4 (diff)
downloadgdb-d6f48aed23d1004a4ed8ab3b2742b0bf7c838c1c.zip
gdb-d6f48aed23d1004a4ed8ab3b2742b0bf7c838c1c.tar.gz
gdb-d6f48aed23d1004a4ed8ab3b2742b0bf7c838c1c.tar.bz2
ELF: Add run-time tests for -z now
* testsuite/ld-elf/shared.exp: Add run-time tests for -z now. * testsuite/ld-i386/tls.exp: Likewise. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-x86-64/tls.exp: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
-rw-r--r--ld/testsuite/ld-x86-64/tls.exp53
1 files changed, 53 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/tls.exp b/ld/testsuite/ld-x86-64/tls.exp
index 7061320..e578645 100644
--- a/ld/testsuite/ld-x86-64/tls.exp
+++ b/ld/testsuite/ld-x86-64/tls.exp
@@ -65,6 +65,14 @@ run_cc_link_tests [list \
{} \
"libtls-1b.so" \
] \
+ [list \
+ "Build libtls-1bn.so" \
+ "-Wl,-z,now -shared tmpdir/tls-gd1.o tmpdir/tls-ld1.o" \
+ "" \
+ {dummy.s} \
+ {} \
+ "libtls-1bn.so" \
+ ] \
]
run_ld_link_exec_tests [list \
@@ -78,6 +86,15 @@ run_ld_link_exec_tests [list \
"pass.out" \
] \
[list \
+ "TLS GD/LD -> LE transition without PLT (dynamic, -z now)" \
+ "-Wl,-z,now tmpdir/tls-def1.o tmpdir/tls-main1.o tmpdir/tls-gd1.o \
+ tmpdir/tls-ld1.o" \
+ "" \
+ { dummy.s } \
+ "tls-1an" \
+ "pass.out" \
+ ] \
+ [list \
"TLS GD/LD -> LE transition without PLT (PIE)" \
"-pie tmpdir/tls-def1.o tmpdir/tls-main1.o tmpdir/tls-gd1.o \
tmpdir/tls-ld1.o" \
@@ -87,6 +104,15 @@ run_ld_link_exec_tests [list \
"pass.out" \
] \
[list \
+ "TLS GD/LD -> LE transition without PLT (PIE, -z now)" \
+ "-pie -Wl,-z,now tmpdir/tls-def1.o tmpdir/tls-main1.o tmpdir/tls-gd1.o \
+ tmpdir/tls-ld1.o" \
+ "" \
+ { dummy.s } \
+ "tls-1bn" \
+ "pass.out" \
+ ] \
+ [list \
"TLS GD/LD -> LE transition without PLT (static)" \
"-static tmpdir/tls-def1.o tmpdir/tls-main1.o tmpdir/tls-gd1.o \
tmpdir/tls-ld1.o" \
@@ -105,6 +131,15 @@ run_ld_link_exec_tests [list \
"pass.out" \
] \
[list \
+ "TLS GD/LD -> IE transition without PLT (-z now)" \
+ "-Wl,-z,now tmpdir/tls-main1.o tmpdir/tls-gd1.o tmpdir/tls-ld1.o \
+ tmpdir/libtls-1a.so -Wl,-R,tmpdir" \
+ "" \
+ { dummy.s } \
+ "tls-1dn" \
+ "pass.out" \
+ ] \
+ [list \
"TLS without PLT (1)" \
"-Wl,--no-as-needed,-R,tmpdir tmpdir/tls-main1.o \
tmpdir/libtls-1a.so tmpdir/libtls-1b.so" \
@@ -122,4 +157,22 @@ run_ld_link_exec_tests [list \
"tls-1f" \
"pass.out" \
] \
+ [list \
+ "TLS without PLT (3)" \
+ "-Wl,-z,now tmpdir/tls-main1.o \
+ tmpdir/libtls-1a.so tmpdir/libtls-1bn.so -Wl,-R,tmpdir" \
+ "" \
+ { dummy.s } \
+ "tls-1en" \
+ "pass.out" \
+ ] \
+ [list \
+ "TLS without PLT (4)" \
+ "-Wl,-z,now tmpdir/tls-main1.o tmpdir/tls-def1.o \
+ tmpdir/libtls-1bn.so -Wl,-R,tmpdir" \
+ "" \
+ { dummy.s } \
+ "tls-1fn" \
+ "pass.out" \
+ ] \
]