# Expect script for ELF MPX tests.
-# Copyright (C) 2013-2016 Free Software Foundation, Inc.
+# Copyright (C) 2013-2020 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
}
# Check to see if the C compiler works
-if { [which $CC] == 0 } {
+if { ![check_compiler_available] } {
return
}
-# Add $PLT_CFLAGS if PLT is expected.
-global PLT_CFLAGS
-
run_cc_link_tests [list \
[list \
"Build libmpx1a.a" \
run_ld_link_tests {
{"Build libcall.so"
- "-m elf_x86_64 -shared -z bndplt" "" "--64"
- {mpx3b.s} {} "libcall.so"}
+ "-m elf_x86_64 -shared -z bndplt" ""
+ "--64" {mpx3b.s} {} "libcall.so"}
{"Build mpx3"
- "-m elf_x86_64 -z bndplt tmpdir/libcall.so" "" "--64"
- {mpx3a.s} {{objdump -dw mpx3.dd}} "mpx3"}
+ "-m elf_x86_64 -z bndplt tmpdir/libcall.so" ""
+ "--64" {mpx3a.s} {{objdump -dw mpx3.dd}} "mpx3"}
{"Build libcall1.so"
- "-m elf_x86_64 -shared -z bndplt" "" "--64"
- {mpx4b.s} {} "libcall1.so"}
+ "-m elf_x86_64 -shared -z bndplt" ""
+ "--64" {mpx4b.s} {} "libcall1.so"}
{"Build mpx4"
- "-m elf_x86_64 -z bndplt tmpdir/libcall1.so" "" "--64"
- {mpx4a.s} {{objdump -dw mpx4.dd}} "mpx4"}
+ "-m elf_x86_64 -z bndplt --hash-style=sysv tmpdir/libcall1.so \
+ -z max-page-size=0x200000 -z noseparate-code" ""
+ "--64 -mx86-used-note=no" {mpx4a.s} {{objdump -dw mpx4.dd}} "mpx4"}
+ {"Build mpx3 (-z now)"
+ "-z now -m elf_x86_64 -z bndplt --hash-style=sysv tmpdir/libcall.so \
+ -z max-page-size=0x200000 -z noseparate-code" ""
+ "--64 -mx86-used-note=no" {mpx3a.s} {{objdump -dw mpx3n.dd}} "mpx3n"}
+ {"Build mpx4 (-z now)"
+ "-z now -m elf_x86_64 -z bndplt --hash-style=sysv tmpdir/libcall1.so \
+ -z max-page-size=0x200000 -z noseparate-code" ""
+ "--64 -mx86-used-note=no" {mpx4a.s} {{objdump -dw mpx4n.dd}} "mpx4n"}
}
run_ld_link_exec_tests $run_tests
run_dump_test "bnd-ifunc-1"
run_dump_test "bnd-ifunc-2"
run_dump_test "bnd-plt-1"
+run_dump_test "bnd-branch-1-now"
+run_dump_test "bnd-ifunc-1-now"
+run_dump_test "bnd-ifunc-2-now"
+run_dump_test "bnd-plt-1-now"