aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ifunc/ifunc.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-ifunc/ifunc.exp')
-rw-r--r--ld/testsuite/ld-ifunc/ifunc.exp124
1 files changed, 124 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
index d9cc381..9f4aa73 100644
--- a/ld/testsuite/ld-ifunc/ifunc.exp
+++ b/ld/testsuite/ld-ifunc/ifunc.exp
@@ -581,6 +581,76 @@ run_cc_link_tests [list \
{} \
"libpr18841cn.so" \
] \
+ [list \
+ "Build libpr23169a.so" \
+ "-shared" \
+ "-fPIC -O2 -g" \
+ { pr23169a.c } \
+ {} \
+ "libpr23169a.so" \
+ ] \
+ [list \
+ "Build libpr23169b.so" \
+ "-shared -Wl,-z,now" \
+ "-fPIC -O2 -g" \
+ { pr23169a.c } \
+ {} \
+ "libpr23169b.so" \
+ ] \
+ [list \
+ "Build pr23169a" \
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libpr23169a.so" \
+ "$NOPIE_CFLAGS -O2 -g" \
+ { pr23169b.c pr23169c.c } \
+ {{readelf {--dyn-syms} pr23169a.rd} \
+ {readelf {-r -W} pr23169b.rd}} \
+ "pr23169a" \
+ ] \
+ [list \
+ "Build pr23169b" \
+ "-pie -Wl,--no-as-needed tmpdir/libpr23169a.so" \
+ "-fPIE -O2 -g" \
+ { pr23169b.c pr23169c.c } \
+ {{readelf {--dyn-syms} pr23169c.rd} \
+ {readelf {-r -W} pr23169b.rd}} \
+ "pr23169b" \
+ ] \
+ [list \
+ "Build pr23169c" \
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libpr23169a.so" \
+ "-fPIE -O2 -g" \
+ { pr23169b.c pr23169c.c } \
+ {{readelf {--dyn-syms} pr23169c.rd} \
+ {readelf {-r -W} pr23169b.rd}} \
+ "pr23169c" \
+ ] \
+ [list \
+ "Build pr23169d" \
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed,-z,now tmpdir/libpr23169b.so" \
+ "$NOPIE_CFLAGS -O2 -g" \
+ { pr23169b.c pr23169c.c } \
+ {{readelf {--dyn-syms} pr23169a.rd} \
+ {readelf {-r -W} pr23169b.rd}} \
+ "pr23169d" \
+ ] \
+ [list \
+ "Build pr23169e" \
+ "-pie -Wl,--no-as-needed,-z,now tmpdir/libpr23169b.so" \
+ "-fPIE -O2 -g" \
+ { pr23169b.c pr23169c.c } \
+ {{readelf {--dyn-syms} pr23169c.rd} \
+ {readelf {-r -W} pr23169b.rd}} \
+ "pr23169e" \
+ ] \
+ [list \
+ "Build pr23169f" \
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed,-z,now tmpdir/libpr23169b.so" \
+ "-fPIE -O2 -g" \
+ { pr23169b.c pr23169c.c } \
+ {{readelf {--dyn-syms} pr23169c.rd} \
+ {readelf {-r -W} pr23169b.rd}} \
+ "pr23169f" \
+ ] \
]
run_ld_link_exec_tests [list \
@@ -632,4 +702,58 @@ run_ld_link_exec_tests [list \
"pr18841cn" \
"pr18841.out" \
] \
+ [list \
+ "Run pr23169a" \
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libpr23169a.so" \
+ "" \
+ { pr23169b.c pr23169c.c } \
+ "pr23169a" \
+ "pass.out" \
+ "$NOPIE_CFLAGS -O2 -g" \
+ ] \
+ [list \
+ "Run pr23169b" \
+ "-pie -Wl,--no-as-needed tmpdir/libpr23169a.so" \
+ "" \
+ { pr23169b.c pr23169c.c } \
+ "pr23169b" \
+ "pass.out" \
+ "-fPIE -O2 -g" \
+ ] \
+ [list \
+ "Run pr23169c" \
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libpr23169a.so" \
+ "" \
+ { pr23169b.c pr23169c.c } \
+ "pr23169c" \
+ "pass.out" \
+ "-fPIE -O2 -g" \
+ ] \
+ [list \
+ "Run pr23169d" \
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed,-z,now tmpdir/libpr23169b.so" \
+ "" \
+ { pr23169b.c pr23169c.c } \
+ "pr23169d" \
+ "pass.out" \
+ "$NOPIE_CFLAGS -O2 -g" \
+ ] \
+ [list \
+ "Run pr23169e" \
+ "-pie -Wl,--no-as-needed,-z,now tmpdir/libpr23169b.so" \
+ "" \
+ { pr23169b.c pr23169c.c } \
+ "pr23169e" \
+ "pass.out" \
+ "-fPIE -O2 -g" \
+ ] \
+ [list \
+ "Run pr23169f" \
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed,-z,now tmpdir/libpr23169b.so" \
+ "" \
+ { pr23169b.c pr23169c.c } \
+ "pr23169f" \
+ "pass.out" \
+ "-fPIE -O2 -g" \
+ ] \
]