aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/shared.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf/shared.exp')
-rw-r--r--ld/testsuite/ld-elf/shared.exp26
1 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index afc262c..bbfd464 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -453,3 +453,29 @@ set run_cxx_tests {
run_cc_link_tests $build_cxx_tests
run_ld_link_exec_tests [] $run_cxx_tests
+
+if { [istarget *-*-linux*]
+ || [istarget *-*-nacl*]
+ || [istarget *-*-gnu*] } {
+ run_cc_link_tests [list \
+ [list \
+ "Build libpr2404b.a with PIE" \
+ "" \
+ "-fPIE" \
+ { pr2404b.c } \
+ {} \
+ "libpr2404b.a" \
+ ] \
+ ]
+ run_ld_link_exec_tests [] [list \
+ [list \
+ "Run pr2404 with PIE" \
+ "-pie tmpdir/pr2404b.o tmpdir/libpr2404a.so" \
+ "" \
+ { dummy.c } \
+ "pr2404pie" \
+ "pr2404.out" \
+ "-fPIE" \
+ ] \
+ ]
+}