summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386/i386.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-i386/i386.exp')
-rw-r--r--ld/testsuite/ld-i386/i386.exp55
1 files changed, 55 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 3c5de021b2b..c91a8611f37 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -1245,6 +1245,17 @@ if { [isnative]
if { [isnative]
&& [istarget "i?86-*-*"]
&& [which $CC] != 0 } {
+ run_cc_link_tests [list \
+ [list \
+ "Build pr22001-1.so" \
+ "-shared" \
+ "" \
+ { pr22001-1a.c } \
+ {} \
+ "pr22001-1.so" \
+ ] \
+ ]
+
run_ld_link_exec_tests [list \
[list \
"Run weakundef1 without PIE" \
@@ -1255,7 +1266,51 @@ if { [isnative]
"pass.out" \
"$NOPIE_CFLAGS" \
] \
+ [list \
+ "Run pr22001-1" \
+ "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \
+ "" \
+ { pr22001-1b.c } \
+ "pr22001-1" \
+ "pass.out" \
+ "$NOPIE_CFLAGS" \
+ ] \
+ [list \
+ "Run pr22001-1 (PIE 1)" \
+ "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \
+ "" \
+ { pr22001-1c.S } \
+ "pr22001-1-pie-1" \
+ "pass.out" \
+ ] \
+ [list \
+ "Run pr22001-1 (PIE 2)" \
+ "-pie -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \
+ "" \
+ { pr22001-1c.S } \
+ "pr22001-1-pie-2" \
+ "pass.out" \
+ ] \
+ [list \
+ "Run pr22001-1 (PIC 1)" \
+ "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \
+ "" \
+ { pr22001-1b.c } \
+ "pr22001-1-pic-1" \
+ "pass.out" \
+ "-fPIC" \
+ ] \
+ [list \
+ "Run pr22001-1 (PIC 2)" \
+ "-pie -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \
+ "" \
+ { pr22001-1b.c } \
+ "pr22001-1-pic-2" \
+ "pass.out" \
+ "-fPIC" \
+ ] \
]
+
if { [at_least_gcc_version 5 0] } {
run_ld_link_exec_tests [list \
[list \