run_dump_test "pr20253-5"
run_dump_test "pr20515"
run_dump_test "property-x86-3"
+run_dump_test "property-x86-4a"
+run_dump_test "property-x86-4b"
+run_dump_test "property-x86-ibt1a"
+run_dump_test "property-x86-ibt1b"
+run_dump_test "property-x86-ibt2"
+run_dump_test "property-x86-ibt3a"
+run_dump_test "property-x86-ibt3b"
+run_dump_test "property-x86-ibt4"
+run_dump_test "property-x86-ibt5"
+run_dump_test "property-x86-shstk1a"
+run_dump_test "property-x86-shstk1b"
+run_dump_test "property-x86-shstk2"
+run_dump_test "property-x86-shstk3a"
+run_dump_test "property-x86-shstk3b"
+run_dump_test "property-x86-shstk4"
+run_dump_test "property-x86-shstk5"
+run_dump_test "pie1"
+run_dump_test "pie1-nacl"
if { !([istarget "i?86-*-linux*"]
|| [istarget "i?86-*-gnu*"]
] \
[list \
"Build gotpc1" \
- "-Wl,--as-needed tmpdir/gotpc1.o tmpdir/got1d.so" \
+ "$NOPIE_LDFLAGS -Wl,--as-needed tmpdir/gotpc1.o tmpdir/got1d.so" \
"" \
{ dummy.s } \
{{objdump {-dw} got1.dd}} \
] \
[list \
"Run pr19031" \
- "tmpdir/pr19031.so" \
+ "$NOPIE_LDFLAGS tmpdir/pr19031.so" \
"" \
{ pr19031b.S pr19031c.c } \
"pr19031" \
"pr19031.out" \
+ "$NOPIE_CFLAGS" \
] \
[list \
"Run got1" \
- "tmpdir/got1d.so" \
+ "$NOPIE_LDFLAGS tmpdir/got1d.so" \
"" \
{ got1a.S got1b.c got1c.c } \
"got1" \
] \
]
- undefined_weak "" ""
- undefined_weak "-fPIE" ""
+ undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
+ undefined_weak "-fPIE" "$NOPIE_LDFLAGS"
undefined_weak "-fPIE" "-pie"
- undefined_weak "-fPIE" "-z nodynamic-undefined-weak"
+ undefined_weak "-fPIE" "-z nodynamic-undefined-weak $NOPIE_LDFLAGS"
undefined_weak "-fPIE" "-pie -z nodynamic-undefined-weak"
}
+global NOPIE_CFLAGS NOPIE_LDFLAGS
+
# Must be native with the C compiler and working IFUNC support,
if { [isnative]
&& [check_ifunc_available]
"pass.out" \
] \
]
+
+ if { [istarget "i?86-*-linux*"] } {
+ run_cc_link_tests [list \
+ [list \
+ "Build pr21168.so with -z ibtplt" \
+ "-shared -Wl,-z,ibtplt" \
+ "" \
+ { pr21168b.S } \
+ "" \
+ "pr21168-ibt.so" \
+ ] \
+ [list \
+ "Build ifunc-1a with -z ibtplt" \
+ "-Wl,-z,ibtplt $NOPIE_LDFLAGS tmpdir/ifunc-1a.o \
+ tmpdir/ifunc-1b.o tmpdir/ifunc-1c.o tmpdir/ifunc-1d.o" \
+ "" \
+ { dummy.c } \
+ {{objdump {-dw} plt-main-ibt.dd}} \
+ "ifunc-1a-ibt" \
+ ] \
+ [list \
+ "Build ifunc-1a with PIE -z ibtplt" \
+ "-Wl,-z,ibtplt -pie tmpdir/ifunc-1a.o \
+ tmpdir/ifunc-1b.o tmpdir/ifunc-1c.o tmpdir/ifunc-1d.o" \
+ "" \
+ { dummy.c } \
+ {{objdump {-dw} plt-pie-ibt.dd}} \
+ "ifunc-1a-pie-ibt" \
+ ] \
+ ]
+
+ run_ld_link_exec_tests [list \
+ [list \
+ "Run ifunc-1a with -z ibtplt" \
+ "-Wl,-z,ibtplt $NOPIE_LDFLAGS tmpdir/ifunc-1a.o \
+ tmpdir/ifunc-1b.o tmpdir/ifunc-1c.o tmpdir/ifunc-1d.o" \
+ "" \
+ { dummy.c } \
+ "ifunc-1a-ibt" \
+ "pass.out" \
+ ] \
+ [list \
+ "Run ifunc-1a with PIE -z ibtplt" \
+ "-Wl,-z,ibtplt -pie tmpdir/ifunc-1a.o \
+ tmpdir/ifunc-1b.o tmpdir/ifunc-1c.o tmpdir/ifunc-1d.o" \
+ "" \
+ { dummy.c } \
+ "ifunc-1a-pie-ibt" \
+ "pass.out" \
+ ] \
+ [list \
+ "Run pr21168 with -z ibtplt" \
+ "tmpdir/pr21168a.o tmpdir/pr21168-ibt.so" \
+ "" \
+ { dummy.c } \
+ "pr21168-ibt" \
+ "pass.out" \
+ ] \
+ ]
+ }
+}
+
+# Must be native with the C compiler.
+if { [isnative]
+ && [istarget "i?86-*-*"]
+ && [which $CC] != 0 } {
+ run_ld_link_exec_tests [list \
+ [list \
+ "Run weakundef1 without PIE" \
+ "$NOPIE_LDFLAGS" \
+ "" \
+ { weakundef1.c } \
+ "weakundef1pie" \
+ "pass.out" \
+ "$NOPIE_CFLAGS" \
+ ] \
+ [list \
+ "Run weakundef1 with PIE" \
+ "-pie" \
+ "" \
+ { weakundef1.c } \
+ "weakundef1pie" \
+ "pass.out" \
+ "-fPIE" \
+ ] \
+ ]
}
if { !([istarget "i?86-*-linux*"]
{{objdump -dwr plt-pic2.dd}} \
"plt-pic2.so" \
] \
+ [list \
+ "Build pr21626.so" \
+ "-shared -melf_i386" \
+ "" \
+ "--32" \
+ {property-x86-3.s} \
+ "" \
+ "pr21626.so" \
+ ] \
+ [list \
+ "Build pr21626" \
+ "-melf_i386 tmpdir/pr21626.so" \
+ "" \
+ "--32" \
+ {start.s foo.s} \
+ "" \
+ "pr21626" \
+ ] \
]
# Linux only tests
run_dump_test "pltgot-1"
run_dump_test "pltgot-2"
run_dump_test "pr20830"
+run_dump_test "ibt-plt-1"
+run_dump_test "ibt-plt-2a"
+run_dump_test "ibt-plt-2b"
+run_dump_test "ibt-plt-2c"
+run_dump_test "ibt-plt-2d"
+run_dump_test "ibt-plt-3a"
+run_dump_test "ibt-plt-3b"
+run_dump_test "ibt-plt-3c"
+run_dump_test "ibt-plt-3d"