diff options
author | Martin Liska <mliska@suse.cz> | 2022-12-08 09:12:13 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-12-14 08:48:13 +0100 |
commit | 8ad93045edcff5128fccc8bff23848f2cfae6453 (patch) | |
tree | 5296a7e2552a1a8329c925fe266a649fd2d821a2 /ld/testsuite | |
parent | d0517d6e333c4b6aaae411648628e2923e1f83aa (diff) | |
download | gdb-8ad93045edcff5128fccc8bff23848f2cfae6453.zip gdb-8ad93045edcff5128fccc8bff23848f2cfae6453.tar.gz gdb-8ad93045edcff5128fccc8bff23848f2cfae6453.tar.bz2 |
ld, gold: remove support for -z bndplt (MPX prefix)
bfd/ChangeLog:
* elf-linker-x86.h (struct elf_linker_x86_params): Remove
bndplt.
* elf64-x86-64.c (elf_x86_64_scan_relocs): Ignore
R_X86_64_PLT32_BND.
(elf_x86_64_relocate_section): Similarly here.
(elf_x86_64_link_setup_gnu_properties): Ignore bndplt.
* elfxx-x86.c: Likewise.
* elfxx-x86.h: Likewise.
gold/ChangeLog:
* NEWS: Document -z bndplt.
* options.h (class General_options): Remove bndplt option.
* x86_64.cc (class Output_data_plt_x86_64_bnd): Remove.
(Target_x86_64::do_make_data_plt): Do not use
Output_data_plt_x86_64_bnd.
(Target_x86_64::Scan::get_reference_flags): Likewise.
(Target_x86_64::Scan::check_non_pic): Likewise.
(Target_x86_64::Scan::local): Likewise.
(Target_x86_64::Scan::global): Likewise.
ld/ChangeLog:
* NEWS: Document -z bndplt.
* emulparams/elf_x86_64.sh: Remove bndplt option.
* ld.texi: Likewise.
* testsuite/ld-x86-64/x86-64.exp:
* testsuite/ld-x86-64/bnd-branch-1-now.d: Removed.
* testsuite/ld-x86-64/bnd-branch-1.d: Removed.
* testsuite/ld-x86-64/bnd-branch-1.s: Removed.
* testsuite/ld-x86-64/bnd-ifunc-1-now.d: Removed.
* testsuite/ld-x86-64/bnd-ifunc-1.d: Removed.
* testsuite/ld-x86-64/bnd-ifunc-1.s: Removed.
* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Removed.
* testsuite/ld-x86-64/bnd-ifunc-2.d: Removed.
* testsuite/ld-x86-64/bnd-ifunc-2.s: Removed.
* testsuite/ld-x86-64/bnd-plt-1-now.d: Removed.
* testsuite/ld-x86-64/bnd-plt-1.d: Removed.
* testsuite/ld-x86-64/mpx.exp: Removed.
* testsuite/ld-x86-64/mpx1.out: Removed.
* testsuite/ld-x86-64/mpx1a.c: Removed.
* testsuite/ld-x86-64/mpx1a.rd: Removed.
* testsuite/ld-x86-64/mpx1b.c: Removed.
* testsuite/ld-x86-64/mpx1c.c: Removed.
* testsuite/ld-x86-64/mpx1c.rd: Removed.
* testsuite/ld-x86-64/mpx2.out: Removed.
* testsuite/ld-x86-64/mpx2a.c: Removed.
* testsuite/ld-x86-64/mpx2a.rd: Removed.
* testsuite/ld-x86-64/mpx2b.c: Removed.
* testsuite/ld-x86-64/mpx2c.c: Removed.
* testsuite/ld-x86-64/mpx2c.rd: Removed.
* testsuite/ld-x86-64/mpx3.dd: Removed.
* testsuite/ld-x86-64/mpx3a.s: Removed.
* testsuite/ld-x86-64/mpx3b.s: Removed.
* testsuite/ld-x86-64/mpx3n.dd: Removed.
* testsuite/ld-x86-64/mpx4.dd: Removed.
* testsuite/ld-x86-64/mpx4a.s: Removed.
* testsuite/ld-x86-64/mpx4b.s: Removed.
* testsuite/ld-x86-64/mpx4n.dd: Removed.
* testsuite/ld-x86-64/pr20800a.S: Removed.
* testsuite/ld-x86-64/pr20800b.S: Removed.
* testsuite/ld-x86-64/pr21038a-now.d: Removed.
* testsuite/ld-x86-64/pr21038a.d: Removed.
* testsuite/ld-x86-64/pr21038a.s: Removed.
* testsuite/ld-x86-64/pr21038b-now.d: Removed.
* testsuite/ld-x86-64/pr21038b.d: Removed.
* testsuite/ld-x86-64/pr21038b.s: Removed.
* testsuite/ld-x86-64/pr21038c-now.d: Removed.
* testsuite/ld-x86-64/pr21038c.d: Removed.
* testsuite/ld-x86-64/pr21038c.s: Removed.
Diffstat (limited to 'ld/testsuite')
44 files changed, 0 insertions, 1365 deletions
diff --git a/ld/testsuite/ld-x86-64/bnd-branch-1-now.d b/ld/testsuite/ld-x86-64/bnd-branch-1-now.d deleted file mode 100644 index b1bcea3..0000000 --- a/ld/testsuite/ld-x86-64/bnd-branch-1-now.d +++ /dev/null @@ -1,45 +0,0 @@ -#source: bnd-branch-1.s -mx86-used-note=no -#as: --64 -#ld: -z now -shared -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw - -.*: +file format .* - - -Disassembly of section .plt: - -0+230 <foo2@plt-0x10>: - +[a-f0-9]+: ff 35 82 01 20 00 push 0x200182\(%rip\) # 2003b8 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 84 01 20 00 jmp \*0x200184\(%rip\) # 2003c0 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - -0+240 <foo2@plt>: - +[a-f0-9]+: ff 25 82 01 20 00 jmp \*0x200182\(%rip\) # 2003c8 <foo2> - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: e9 e0 ff ff ff jmp 230 <foo2@plt-0x10> - -0+250 <foo3@plt>: - +[a-f0-9]+: ff 25 7a 01 20 00 jmp \*0x20017a\(%rip\) # 2003d0 <foo3> - +[a-f0-9]+: 68 01 00 00 00 push \$0x1 - +[a-f0-9]+: e9 d0 ff ff ff jmp 230 <foo2@plt-0x10> - -0+260 <foo1@plt>: - +[a-f0-9]+: ff 25 72 01 20 00 jmp \*0x200172\(%rip\) # 2003d8 <foo1> - +[a-f0-9]+: 68 02 00 00 00 push \$0x2 - +[a-f0-9]+: e9 c0 ff ff ff jmp 230 <foo2@plt-0x10> - -0+270 <foo4@plt>: - +[a-f0-9]+: ff 25 6a 01 20 00 jmp \*0x20016a\(%rip\) # 2003e0 <foo4> - +[a-f0-9]+: 68 03 00 00 00 push \$0x3 - +[a-f0-9]+: e9 b0 ff ff ff jmp 230 <foo2@plt-0x10> - -Disassembly of section .text: - -0+280 <_start>: - +[a-f0-9]+: f2 e9 da ff ff ff bnd jmp 260 <foo1@plt> - +[a-f0-9]+: e8 b5 ff ff ff call 240 <foo2@plt> - +[a-f0-9]+: e9 c0 ff ff ff jmp 250 <foo3@plt> - +[a-f0-9]+: e8 db ff ff ff call 270 <foo4@plt> - +[a-f0-9]+: f2 e8 b5 ff ff ff bnd call 250 <foo3@plt> - +[a-f0-9]+: e9 d0 ff ff ff jmp 270 <foo4@plt> -#pass diff --git a/ld/testsuite/ld-x86-64/bnd-branch-1.d b/ld/testsuite/ld-x86-64/bnd-branch-1.d deleted file mode 100644 index dfcf0d0..0000000 --- a/ld/testsuite/ld-x86-64/bnd-branch-1.d +++ /dev/null @@ -1,19 +0,0 @@ -#as: --64 -#ld: -shared -melf_x86_64 -#objdump: -dw - -.*: +file format .* - - -#... -Disassembly of section .text: - -#... -[a-f0-9]+ <_start>: -[ ]*[a-f0-9]+: f2 e9 [a-f0-9]+ ff ff ff bnd jmp [a-f0-9]+ <foo1@plt> -[ ]*[a-f0-9]+: e8 [a-f0-9]+ ff ff ff call [a-f0-9]+ <foo2@plt> -[ ]*[a-f0-9]+: e9 [a-f0-9]+ ff ff ff jmp [a-f0-9]+ <foo3@plt> -[ ]*[a-f0-9]+: e8 [a-f0-9]+ ff ff ff call [a-f0-9]+ <foo4@plt> -[ ]*[a-f0-9]+: f2 e8 [a-f0-9]+ ff ff ff bnd call [a-f0-9]+ <foo3@plt> -[ ]*[a-f0-9]+: e9 [a-f0-9]+ ff ff ff jmp [a-f0-9]+ <foo4@plt> -#pass diff --git a/ld/testsuite/ld-x86-64/bnd-branch-1.s b/ld/testsuite/ld-x86-64/bnd-branch-1.s deleted file mode 100644 index bf62981..0000000 --- a/ld/testsuite/ld-x86-64/bnd-branch-1.s +++ /dev/null @@ -1,9 +0,0 @@ - .text - .globl _start -_start: -bnd jmp foo1@plt - call foo2@plt - jmp foo3@plt - call foo4@plt -bnd call foo3@plt - jmp foo4@plt diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d b/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d deleted file mode 100644 index 01d6389..0000000 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d +++ /dev/null @@ -1,33 +0,0 @@ -#source: bnd-ifunc-1.s -#as: --64 -madd-bnd-prefix -mx86-used-note=no -#ld: -z now -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw - -.*: +file format .* - - -Disassembly of section .plt: - -0+170 <.plt>: - +[a-f0-9]+: ff 35 4a 01 20 00 push 0x20014a\(%rip\) # 2002c0 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 4b 01 20 00 bnd jmp \*0x20014b\(%rip\) # 2002c8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 170 <\*ABS\*\+0x198@plt-0x20> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+190 <\*ABS\*\+0x198@plt>: - +[a-f0-9]+: f2 ff 25 39 01 20 00 bnd jmp \*0x200139\(%rip\) # 2002d0 <_GLOBAL_OFFSET_TABLE_\+0x18> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+198 <foo>: - +[a-f0-9]+: f2 c3 bnd ret - -0+19a <bar>: - +[a-f0-9]+: f2 e8 f0 ff ff ff bnd call 190 <\*ABS\*\+0x198@plt> - +[a-f0-9]+: f2 c3 bnd ret -#pass diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-1.d b/ld/testsuite/ld-x86-64/bnd-ifunc-1.d deleted file mode 100644 index 86453f1..0000000 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-1.d +++ /dev/null @@ -1,7 +0,0 @@ -#as: --64 -madd-bnd-prefix -#ld: -shared -melf_x86_64 -z bndplt --hash-style=sysv -#objdump: -dw - -#... -[ ]*[a-f0-9]+: f2 e8 f0 ff ff ff bnd call [a-f0-9]+ <\*ABS\*\+0x[a-f0-9]+@plt> -#pass diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-1.s b/ld/testsuite/ld-x86-64/bnd-ifunc-1.s deleted file mode 100644 index 82b64f0..0000000 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-1.s +++ /dev/null @@ -1,16 +0,0 @@ - .type foo, %gnu_indirect_function - .global __GI_foo - .hidden __GI_foo - .set __GI_foo, foo - .text -.globl foo - .type foo, @function -foo: - ret - .size foo, .-foo -.globl bar - .type bar, @function -bar: - call __GI_foo@PLT - ret - .size bar, .-bar diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-2-now.d b/ld/testsuite/ld-x86-64/bnd-ifunc-2-now.d deleted file mode 100644 index fa7ec07..0000000 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-2-now.d +++ /dev/null @@ -1,59 +0,0 @@ -#source: bnd-ifunc-2.s -#as: --64 -madd-bnd-prefix -mx86-used-note=no -#ld: -z now -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw - -.*: +file format .* - - -Disassembly of section .plt: - -0+240 <.plt>: - +[a-f0-9]+: ff 35 9a 01 20 00 push 0x20019a\(%rip\) # 2003e0 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 9b 01 20 00 bnd jmp \*0x20019b\(%rip\) # 2003e8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 03 00 00 00 push \$0x3 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 240 <\*ABS\*\+0x2bc@plt-0x50> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmp 240 <\*ABS\*\+0x2bc@plt-0x50> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - +[a-f0-9]+: 68 01 00 00 00 push \$0x1 - +[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmp 240 <\*ABS\*\+0x2bc@plt-0x50> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - +[a-f0-9]+: 68 02 00 00 00 push \$0x2 - +[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmp 240 <\*ABS\*\+0x2bc@plt-0x50> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+290 <\*ABS\*\+0x2bc@plt>: - +[a-f0-9]+: f2 ff 25 59 01 20 00 bnd jmp \*0x200159\(%rip\) # 2003f0 <_GLOBAL_OFFSET_TABLE_\+0x18> - +[a-f0-9]+: 90 nop - -0+298 <func1@plt>: - +[a-f0-9]+: f2 ff 25 59 01 20 00 bnd jmp \*0x200159\(%rip\) # 2003f8 <func1> - +[a-f0-9]+: 90 nop - -0+2a0 <func2@plt>: - +[a-f0-9]+: f2 ff 25 59 01 20 00 bnd jmp \*0x200159\(%rip\) # 200400 <func2> - +[a-f0-9]+: 90 nop - -0+2a8 <\*ABS\*\+0x2b0@plt>: - +[a-f0-9]+: f2 ff 25 59 01 20 00 bnd jmp \*0x200159\(%rip\) # 200408 <_GLOBAL_OFFSET_TABLE_\+0x30> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+2b0 <resolve1>: - +[a-f0-9]+: f2 e8 e2 ff ff ff bnd call 298 <func1@plt> - -0+2b6 <g1>: - +[a-f0-9]+: f2 e9 ec ff ff ff bnd jmp 2a8 <\*ABS\*\+0x2b0@plt> - -0+2bc <resolve2>: - +[a-f0-9]+: f2 e8 de ff ff ff bnd call 2a0 <func2@plt> - -0+2c2 <g2>: - +[a-f0-9]+: f2 e9 c8 ff ff ff bnd jmp 290 <\*ABS\*\+0x2bc@plt> -#pass diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-2.d b/ld/testsuite/ld-x86-64/bnd-ifunc-2.d deleted file mode 100644 index 36534b1..0000000 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-2.d +++ /dev/null @@ -1,54 +0,0 @@ -#as: --64 -madd-bnd-prefix -mx86-used-note=no -#ld: -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw - -#... -0+240 <.plt>: -[ ]*[a-f0-9]+: ff 35 7a 01 20 00 push 0x20017a\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: f2 ff 25 7b 01 20 00 bnd jmp \*0x20017b\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 68 03 00 00 00 push \$0x3 -[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 240 <\*ABS\*\+0x2bc@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 68 00 00 00 00 push \$0x0 -[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmp 240 <\*ABS\*\+0x2bc@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 68 01 00 00 00 push \$0x1 -[ ]*[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmp 240 <\*ABS\*\+0x2bc@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 68 02 00 00 00 push \$0x2 -[ ]*[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmp 240 <\*ABS\*\+0x2bc@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+290 <\*ABS\*\+0x2bc@plt>: -[ ]*[a-f0-9]+: f2 ff 25 39 01 20 00 bnd jmp \*0x200139\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 90 nop - -0+298 <func1@plt>: -[ ]*[a-f0-9]+: f2 ff 25 39 01 20 00 bnd jmp \*0x200139\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 90 nop - -0+2a0 <func2@plt>: -[ ]*[a-f0-9]+: f2 ff 25 39 01 20 00 bnd jmp \*0x200139\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 90 nop - -0+2a8 <\*ABS\*\+0x2b0@plt>: -[ ]*[a-f0-9]+: f2 ff 25 39 01 20 00 bnd jmp \*0x200139\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+2b0 <resolve1>: -[ ]*[a-f0-9]+: f2 e8 e2 ff ff ff bnd call 298 <func1@plt> - -0+2b6 <g1>: -[ ]*[a-f0-9]+: f2 e9 ec ff ff ff bnd jmp 2a8 <\*ABS\*\+0x2b0@plt> - -0+2bc <resolve2>: -[ ]*[a-f0-9]+: f2 e8 de ff ff ff bnd call 2a0 <func2@plt> - -0+2c2 <g2>: -[ ]*[a-f0-9]+: f2 e9 c8 ff ff ff bnd jmp 290 <\*ABS\*\+0x2bc@plt> -#pass diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-2.s b/ld/testsuite/ld-x86-64/bnd-ifunc-2.s deleted file mode 100644 index 86470a2..0000000 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-2.s +++ /dev/null @@ -1,28 +0,0 @@ - .text - .globl fct1 - .type fct1, @gnu_indirect_function - .set fct1,resolve1 - .hidden int_fct1 - .globl int_fct1 - .set int_fct1,fct1 - .type resolve1, @function -resolve1: - call func1@PLT - .globl g1 - .type g1, @function -g1: - jmp int_fct1@PLT - - .globl fct2 - .type fct2, @gnu_indirect_function - .set fct2,resolve2 - .hidden int_fct2 - .globl int_fct2 - .set int_fct2,fct2 - .type resolve2, @function -resolve2: - call func2@PLT - .globl g2 - .type g2, @function -g2: - jmp int_fct2@PLT diff --git a/ld/testsuite/ld-x86-64/bnd-plt-1-now.d b/ld/testsuite/ld-x86-64/bnd-plt-1-now.d deleted file mode 100644 index 47289a0..0000000 --- a/ld/testsuite/ld-x86-64/bnd-plt-1-now.d +++ /dev/null @@ -1,55 +0,0 @@ -#source: bnd-branch-1.s -#as: --64 -mx86-used-note=no -#ld: -z now -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw - -.*: +file format .* - - -Disassembly of section .plt: - -0+230 <.plt>: - +[a-f0-9]+: ff 35 a2 01 20 00 push 0x2001a2\(%rip\) # 2003d8 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 a3 01 20 00 bnd jmp \*0x2001a3\(%rip\) # 2003e0 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 230 <foo2@plt-0x50> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - +[a-f0-9]+: 68 01 00 00 00 push \$0x1 - +[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmp 230 <foo2@plt-0x50> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - +[a-f0-9]+: 68 02 00 00 00 push \$0x2 - +[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmp 230 <foo2@plt-0x50> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - +[a-f0-9]+: 68 03 00 00 00 push \$0x3 - +[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmp 230 <foo2@plt-0x50> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+280 <foo2@plt>: - +[a-f0-9]+: f2 ff 25 61 01 20 00 bnd jmp \*0x200161\(%rip\) # 2003e8 <foo2> - +[a-f0-9]+: 90 nop - -0+288 <foo3@plt>: - +[a-f0-9]+: f2 ff 25 61 01 20 00 bnd jmp \*0x200161\(%rip\) # 2003f0 <foo3> - +[a-f0-9]+: 90 nop - -0+290 <foo1@plt>: - +[a-f0-9]+: f2 ff 25 61 01 20 00 bnd jmp \*0x200161\(%rip\) # 2003f8 <foo1> - +[a-f0-9]+: 90 nop - -0+298 <foo4@plt>: - +[a-f0-9]+: f2 ff 25 61 01 20 00 bnd jmp \*0x200161\(%rip\) # 200400 <foo4> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+2a0 <_start>: - +[a-f0-9]+: f2 e9 ea ff ff ff bnd jmp 290 <foo1@plt> - +[a-f0-9]+: e8 d5 ff ff ff call 280 <foo2@plt> - +[a-f0-9]+: e9 d8 ff ff ff jmp 288 <foo3@plt> - +[a-f0-9]+: e8 e3 ff ff ff call 298 <foo4@plt> - +[a-f0-9]+: f2 e8 cd ff ff ff bnd call 288 <foo3@plt> - +[a-f0-9]+: e9 d8 ff ff ff jmp 298 <foo4@plt> -#pass diff --git a/ld/testsuite/ld-x86-64/bnd-plt-1.d b/ld/testsuite/ld-x86-64/bnd-plt-1.d deleted file mode 100644 index f047da8..0000000 --- a/ld/testsuite/ld-x86-64/bnd-plt-1.d +++ /dev/null @@ -1,55 +0,0 @@ -#source: bnd-branch-1.s -#as: --64 -mx86-used-note=no -#ld: -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw - -.*: +file format .* - - -Disassembly of section .plt: - -0+230 <.plt>: -[ ]*[a-f0-9]+: ff 35 82 01 20 00 push 0x200182\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: f2 ff 25 83 01 20 00 bnd jmp \*0x200183\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 68 00 00 00 00 push \$0x0 -[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 230 <foo2@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 68 01 00 00 00 push \$0x1 -[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmp 230 <foo2@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 68 02 00 00 00 push \$0x2 -[ ]*[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmp 230 <foo2@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 68 03 00 00 00 push \$0x3 -[ ]*[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmp 230 <foo2@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+280 <foo2@plt>: -[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmp \*0x200141\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 90 nop - -0+288 <foo3@plt>: -[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmp \*0x200141\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 90 nop - -0+290 <foo1@plt>: -[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmp \*0x200141\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 90 nop - -0+298 <foo4@plt>: -[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmp \*0x200141\(%rip\)[ ]*(#.*)? -[ ]*[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+2a0 <_start>: -[ ]*[a-f0-9]+: f2 e9 ea ff ff ff bnd jmp 290 <foo1@plt> -[ ]*[a-f0-9]+: e8 d5 ff ff ff call 280 <foo2@plt> -[ ]*[a-f0-9]+: e9 d8 ff ff ff jmp 288 <foo3@plt> -[ ]*[a-f0-9]+: e8 e3 ff ff ff call 298 <foo4@plt> -[ ]*[a-f0-9]+: f2 e8 cd ff ff ff bnd call 288 <foo3@plt> -[ ]*[a-f0-9]+: e9 d8 ff ff ff jmp 298 <foo4@plt> -#pass diff --git a/ld/testsuite/ld-x86-64/mpx.exp b/ld/testsuite/ld-x86-64/mpx.exp deleted file mode 100644 index c39f399..0000000 --- a/ld/testsuite/ld-x86-64/mpx.exp +++ /dev/null @@ -1,138 +0,0 @@ -# Expect script for ELF MPX tests. -# Copyright (C) 2013-2022 Free Software Foundation, Inc. -# -# This file is part of the GNU Binutils. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, -# MA 02110-1301, USA. -# - -# The following tests require running the executable generated by ld, -# or enough of a build environment to create a fully linked executable. -# This is not commonly available when testing a cross-built linker. -if ![isnative] { - return -} - -# Only on Linux for now. -if ![istarget "x86_64-*-linux*"] { - return -} - -# Check to see if the C compiler works -if { ![check_compiler_available] } { - return -} - -run_cc_link_tests [list \ - [list \ - "Build libmpx1a.a" \ - "" \ - "-Wa,-madd-bnd-prefix -fPIC $PLT_CFLAGS" \ - {mpx1a.c} \ - {{readelf {-r --wide} mpx1a.rd}} \ - "libmpx1a.a" \ - ] \ - [list \ - "Build libmpx1b.a" \ - "" \ - "" \ - {mpx1b.c} \ - {} \ - "libmpx1b.a" \ - ] \ - [list \ - "Build libmpx1c.a" \ - "" \ - "-Wa,-madd-bnd-prefix" \ - {mpx1c.c} \ - {{readelf {-r --wide} mpx1c.rd}} \ - "libmpx1c.a" \ - ] \ - [list \ - "Build libmpx2a.a" \ - "" \ - "-Wa,-madd-bnd-prefix -fPIE $PLT_CFLAGS" \ - {mpx2a.c} \ - {{readelf {-r --wide} mpx2a.rd}} \ - "libmpx2a.a" \ - ] \ - [list \ - "Build libmpx2b.a" \ - "" \ - "-fPIE" \ - {mpx2b.c} \ - {} \ - "libmpx2b.a" \ - ] \ - [list \ - "Build libmpx2c.a" \ - "" \ - "-Wa,-madd-bnd-prefix -fPIE $PLT_CFLAGS" \ - {mpx2c.c} \ - {{readelf {-r --wide} mpx2c.rd}} \ - "libmpx2c.a" \ - ] \ -] - -set run_tests { - {"Run mpx1" - "tmpdir/mpx1a.o tmpdir/mpx1b.o tmpdir/mpx1c.o" "" - {dummy.s} "mpx1" "mpx1.out"} - {"Run mpx1 with -static" - "tmpdir/mpx1a.o tmpdir/mpx1b.o tmpdir/mpx1c.o -static" "" - {dummy.s} "mpx1static" "mpx1.out"} - {"Run mpx2" - "tmpdir/mpx2a.o tmpdir/mpx2b.o tmpdir/mpx2c.o -pie" "" - {dummy.s} "mpx2" "mpx2.out"} - {"Run mpx2 with -static" - "tmpdir/mpx2a.o tmpdir/mpx2b.o tmpdir/mpx2c.o -static" "" - {dummy.s} "mpx2static" "mpx2.out"} -} - -run_ld_link_tests { - {"Build 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"} - {"Build libcall1.so" - "-m elf_x86_64 -shared -z bndplt" "" - "--64" {mpx4b.s} {} "libcall1.so"} - {"Build 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-branch-1" -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" diff --git a/ld/testsuite/ld-x86-64/mpx1.out b/ld/testsuite/ld-x86-64/mpx1.out deleted file mode 100644 index 4630211..0000000 --- a/ld/testsuite/ld-x86-64/mpx1.out +++ /dev/null @@ -1,2 +0,0 @@ -foo1 -foo2 diff --git a/ld/testsuite/ld-x86-64/mpx1a.c b/ld/testsuite/ld-x86-64/mpx1a.c deleted file mode 100644 index e1185b5..0000000 --- a/ld/testsuite/ld-x86-64/mpx1a.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -void -foo1 (void) -{ - printf ("foo1\n"); -} diff --git a/ld/testsuite/ld-x86-64/mpx1a.rd b/ld/testsuite/ld-x86-64/mpx1a.rd deleted file mode 100644 index d66524c..0000000 --- a/ld/testsuite/ld-x86-64/mpx1a.rd +++ /dev/null @@ -1,3 +0,0 @@ -#... -[0-9a-f ]+R_X86_64_PLT32 +0+ +.* -#... diff --git a/ld/testsuite/ld-x86-64/mpx1b.c b/ld/testsuite/ld-x86-64/mpx1b.c deleted file mode 100644 index 389ac10..0000000 --- a/ld/testsuite/ld-x86-64/mpx1b.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -void -foo2 (void) -{ - printf ("foo2\n"); -} diff --git a/ld/testsuite/ld-x86-64/mpx1c.c b/ld/testsuite/ld-x86-64/mpx1c.c deleted file mode 100644 index 12c7806..0000000 --- a/ld/testsuite/ld-x86-64/mpx1c.c +++ /dev/null @@ -1,10 +0,0 @@ -extern void foo1 (void); -extern void foo2 (void); - -int -main (void) -{ - foo1 (); - foo2 (); - return 0; -} diff --git a/ld/testsuite/ld-x86-64/mpx1c.rd b/ld/testsuite/ld-x86-64/mpx1c.rd deleted file mode 100644 index d66524c..0000000 --- a/ld/testsuite/ld-x86-64/mpx1c.rd +++ /dev/null @@ -1,3 +0,0 @@ -#... -[0-9a-f ]+R_X86_64_PLT32 +0+ +.* -#... diff --git a/ld/testsuite/ld-x86-64/mpx2.out b/ld/testsuite/ld-x86-64/mpx2.out deleted file mode 100644 index 4630211..0000000 --- a/ld/testsuite/ld-x86-64/mpx2.out +++ /dev/null @@ -1,2 +0,0 @@ -foo1 -foo2 diff --git a/ld/testsuite/ld-x86-64/mpx2a.c b/ld/testsuite/ld-x86-64/mpx2a.c deleted file mode 100644 index e1185b5..0000000 --- a/ld/testsuite/ld-x86-64/mpx2a.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -void -foo1 (void) -{ - printf ("foo1\n"); -} diff --git a/ld/testsuite/ld-x86-64/mpx2a.rd b/ld/testsuite/ld-x86-64/mpx2a.rd deleted file mode 100644 index d66524c..0000000 --- a/ld/testsuite/ld-x86-64/mpx2a.rd +++ /dev/null @@ -1,3 +0,0 @@ -#... -[0-9a-f ]+R_X86_64_PLT32 +0+ +.* -#... diff --git a/ld/testsuite/ld-x86-64/mpx2b.c b/ld/testsuite/ld-x86-64/mpx2b.c deleted file mode 100644 index 389ac10..0000000 --- a/ld/testsuite/ld-x86-64/mpx2b.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -void -foo2 (void) -{ - printf ("foo2\n"); -} diff --git a/ld/testsuite/ld-x86-64/mpx2c.c b/ld/testsuite/ld-x86-64/mpx2c.c deleted file mode 100644 index 12c7806..0000000 --- a/ld/testsuite/ld-x86-64/mpx2c.c +++ /dev/null @@ -1,10 +0,0 @@ -extern void foo1 (void); -extern void foo2 (void); - -int -main (void) -{ - foo1 (); - foo2 (); - return 0; -} diff --git a/ld/testsuite/ld-x86-64/mpx2c.rd b/ld/testsuite/ld-x86-64/mpx2c.rd deleted file mode 100644 index d66524c..0000000 --- a/ld/testsuite/ld-x86-64/mpx2c.rd +++ /dev/null @@ -1,3 +0,0 @@ -#... -[0-9a-f ]+R_X86_64_PLT32 +0+ +.* -#... diff --git a/ld/testsuite/ld-x86-64/mpx3.dd b/ld/testsuite/ld-x86-64/mpx3.dd deleted file mode 100644 index 729b1cf..0000000 --- a/ld/testsuite/ld-x86-64/mpx3.dd +++ /dev/null @@ -1,28 +0,0 @@ -.*: +file format .* - - -Disassembly of section .plt: - -0+[a-f0-9]+ <.plt>: -[ ]*[a-f0-9]+: ff ([0-9a-f]{2} ){5} push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> -[ ]*[a-f0-9]+: f2 ff ([0-9a-f]{2} ){5} bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 68 00 00 00 00 push \$0x0 -[ ]*[a-f0-9]+: f2 e9 ([0-9a-f]{2} ){4} bnd jmp [a-f0-9]+ <call1@plt-0x20> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+[a-f0-9]+ <call1@plt>: -[ ]*[a-f0-9]+: f2 ff ([0-9a-f]{2} ){5} bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <call1> -[ ]*[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+[a-f0-9]+ <_start>: -[ ]*[a-f0-9]+: bf ([0-9a-f]{2} ){4} mov \$0x[a-f0-9]+,%edi -[ ]*[a-f0-9]+: f2 ff d7 bnd call \*%rdi -[ ]*[a-f0-9]+: 48 8b ([0-9a-f]{2} ){5} mov 0x[a-f0-9]+\(%rip\),%rdi # [a-f0-9]+ <call2> -[ ]*[a-f0-9]+: f2 ff d7 bnd call \*%rdi -[ ]*[a-f0-9]+: c3 ret * -#pass diff --git a/ld/testsuite/ld-x86-64/mpx3a.s b/ld/testsuite/ld-x86-64/mpx3a.s deleted file mode 100644 index 28cb580..0000000 --- a/ld/testsuite/ld-x86-64/mpx3a.s +++ /dev/null @@ -1,16 +0,0 @@ - .text - .globl _start - .type _start, @function -_start: - movl $call1, %edi - bnd call *%rdi - movq func(%rip), %rdi - bnd call *%rdi - ret - .size _start, .-_start - .globl func - .data - .type func, @object - .size func, 8 -func: - .quad call2 diff --git a/ld/testsuite/ld-x86-64/mpx3b.s b/ld/testsuite/ld-x86-64/mpx3b.s deleted file mode 100644 index 1ee2557..0000000 --- a/ld/testsuite/ld-x86-64/mpx3b.s +++ /dev/null @@ -1,11 +0,0 @@ - .text - .globl call1 - .type call1, @function -call1: - ret - .size call1, .-call1 - .globl call2 - .type call2, @function -call2: - ret - .size call2, .-call2 diff --git a/ld/testsuite/ld-x86-64/mpx3n.dd b/ld/testsuite/ld-x86-64/mpx3n.dd deleted file mode 100644 index a1eba8e..0000000 --- a/ld/testsuite/ld-x86-64/mpx3n.dd +++ /dev/null @@ -1,28 +0,0 @@ -.*: +file format .* - - -Disassembly of section .plt: - -0+400220 <.plt>: - +[a-f0-9]+: ff 35 a2 01 20 00 push 0x2001a2\(%rip\) # 6003c8 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 a3 01 20 00 bnd jmp \*0x2001a3\(%rip\) # 6003d0 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 400220 <call1@plt-0x20> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+400240 <call1@plt>: - +[a-f0-9]+: f2 ff 25 91 01 20 00 bnd jmp \*0x200191\(%rip\) # 6003d8 <call1> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+400248 <_start>: - +[a-f0-9]+: bf 40 02 40 00 mov \$0x400240,%edi - +[a-f0-9]+: f2 ff d7 bnd call \*%rdi - +[a-f0-9]+: 48 8b 3d 89 01 20 00 mov 0x200189\(%rip\),%rdi # 6003e0 <call2> - +[a-f0-9]+: f2 ff d7 bnd call \*%rdi - +[a-f0-9]+: c3 ret * -#pass diff --git a/ld/testsuite/ld-x86-64/mpx4.dd b/ld/testsuite/ld-x86-64/mpx4.dd deleted file mode 100644 index 50a0fbc..0000000 --- a/ld/testsuite/ld-x86-64/mpx4.dd +++ /dev/null @@ -1,24 +0,0 @@ -.*: +file format .* - - -Disassembly of section .plt: - -0+4001f0 <.plt>: - +[a-f0-9]+: ff 35 42 01 20 00 push 0x200142\(%rip\) # 600338 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 43 01 20 00 bnd jmp \*0x200143\(%rip\) # 600340 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 4001f0 <call1@plt-0x20> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+400210 <call1@plt>: - +[a-f0-9]+: f2 ff 25 31 01 20 00 bnd jmp \*0x200131\(%rip\) # 600348 <call1> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+400218 <_start>: - +[a-f0-9]+: bf 10 02 40 00 mov \$0x400210,%edi - +[a-f0-9]+: f2 ff d7 bnd call \*%rdi diff --git a/ld/testsuite/ld-x86-64/mpx4a.s b/ld/testsuite/ld-x86-64/mpx4a.s deleted file mode 100644 index 0ee2723..0000000 --- a/ld/testsuite/ld-x86-64/mpx4a.s +++ /dev/null @@ -1,6 +0,0 @@ -.text - .globl _start - .type _start, @function -_start: - movl $call1, %edi - bnd call *%rdi diff --git a/ld/testsuite/ld-x86-64/mpx4b.s b/ld/testsuite/ld-x86-64/mpx4b.s deleted file mode 100644 index 0e9ac14..0000000 --- a/ld/testsuite/ld-x86-64/mpx4b.s +++ /dev/null @@ -1,5 +0,0 @@ -.text - .globl call1 - .type call1, @function -call1: - ret diff --git a/ld/testsuite/ld-x86-64/mpx4n.dd b/ld/testsuite/ld-x86-64/mpx4n.dd deleted file mode 100644 index 92177bb..0000000 --- a/ld/testsuite/ld-x86-64/mpx4n.dd +++ /dev/null @@ -1,25 +0,0 @@ -.*: +file format .* - - -Disassembly of section .plt: - -0+4001f0 <.plt>: - +[a-f0-9]+: ff 35 62 01 20 00 push 0x200162\(%rip\) # 600358 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 63 01 20 00 bnd jmp \*0x200163\(%rip\) # 600360 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 4001f0 <call1@plt-0x20> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+400210 <call1@plt>: - +[a-f0-9]+: f2 ff 25 51 01 20 00 bnd jmp \*0x200151\(%rip\) # 600368 <call1> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+400218 <_start>: - +[a-f0-9]+: bf 10 02 40 00 mov \$0x400210,%edi - +[a-f0-9]+: f2 ff d7 bnd call \*%rdi -#pass diff --git a/ld/testsuite/ld-x86-64/pr20800a.S b/ld/testsuite/ld-x86-64/pr20800a.S deleted file mode 100644 index 95024e2..0000000 --- a/ld/testsuite/ld-x86-64/pr20800a.S +++ /dev/null @@ -1,18 +0,0 @@ - .text - .globl main - .type main, @function -main: -.L2: - leaq .L2(%rip), %rax - movabsq $_GLOBAL_OFFSET_TABLE_-.L2, %r11 - movabsq $bar@PLTOFF, %rdx - pushq %r15 - addq %r11, %rax - movq %rax, %r15 - addq %rax, %rdx - call *%rdx - xorl %eax, %eax - popq %r15 - ret - .size main, .-main - .section .note.GNU-stack diff --git a/ld/testsuite/ld-x86-64/pr20800b.S b/ld/testsuite/ld-x86-64/pr20800b.S deleted file mode 100644 index c4eeb4f..0000000 --- a/ld/testsuite/ld-x86-64/pr20800b.S +++ /dev/null @@ -1,21 +0,0 @@ - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: - .string "PASS\n" - .text - .globl bar - .type bar, @function -bar: -.L2: - leaq .L2(%rip), %rdx - movabsq $_GLOBAL_OFFSET_TABLE_-.L2, %r11 - movabsq $.LC0@GOTOFF, %rax - pushq %r15 - movabsq $printf@PLTOFF, %rcx - addq %r11, %rdx - popq %r15 - leaq (%rdx,%rax), %rdi - addq %rdx, %rcx - xorl %eax, %eax - jmp *%rcx - .size bar, .-bar - .section .note.GNU-stack,"",@progbits diff --git a/ld/testsuite/ld-x86-64/pr21038a-now.d b/ld/testsuite/ld-x86-64/pr21038a-now.d deleted file mode 100644 index 1fae617..0000000 --- a/ld/testsuite/ld-x86-64/pr21038a-now.d +++ /dev/null @@ -1,68 +0,0 @@ -#name: PR ld/21038 (.plt.got, -z now) -#source: pr21038a.s -#as: --64 -#ld: -z now -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw -Wf - -.*: +file format .* - -Contents of the .eh_frame section: - - -0+ 0000000000000014 00000000 CIE - Version: 1 - Augmentation: "zR" - Code alignment factor: 1 - Data alignment factor: -8 - Return address column: 16 - Augmentation data: 1b - DW_CFA_def_cfa: r7 \(rsp\) ofs 8 - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop - -0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+30 0000000000000024 00000034 FDE cie=00000000 pc=00000000000001b0..00000000000001c0 - DW_CFA_def_cfa_offset: 16 - DW_CFA_advance_loc: 6 to 00000000000001b6 - DW_CFA_def_cfa_offset: 24 - DW_CFA_advance_loc: 10 to 00000000000001c0 - DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit5; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+58 0000000000000010 0000005c FDE cie=00000000 pc=00000000000001c0..00000000000001c8 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - - -Disassembly of section .plt: - -0+1b0 <.plt>: - +[a-f0-9]+: ff 35 32 fe 3f 00 push 0x3ffe32\(%rip\) # 3fffe8 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 33 fe 3f 00 bnd jmp \*0x3ffe33\(%rip\) # 3ffff0 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -Disassembly of section .plt.got: - -0+1c0 <func@plt>: - +[a-f0-9]+: f2 ff 25 31 fe 3f 00 bnd jmp \*0x3ffe31\(%rip\) # 3ffff8 <func> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+1c8 <foo>: - +[a-f0-9]+: e8 f3 ff ff ff call 1c0 <func@plt> - +[a-f0-9]+: 48 8b 05 24 fe 3f 00 mov 0x3ffe24\(%rip\),%rax # 3ffff8 <func> -#pass diff --git a/ld/testsuite/ld-x86-64/pr21038a.d b/ld/testsuite/ld-x86-64/pr21038a.d deleted file mode 100644 index 06e504e..0000000 --- a/ld/testsuite/ld-x86-64/pr21038a.d +++ /dev/null @@ -1,67 +0,0 @@ -#name: PR ld/21038 (.plt.got) -#as: --64 -#ld: -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw -Wf - -.*: +file format .* - -Contents of the .eh_frame section: - - -0+ 0000000000000014 00000000 CIE - Version: 1 - Augmentation: "zR" - Code alignment factor: 1 - Data alignment factor: -8 - Return address column: 16 - Augmentation data: 1b - DW_CFA_def_cfa: r7 \(rsp\) ofs 8 - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop - -0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+30 0000000000000024 00000034 FDE cie=00000000 pc=00000000000001b0..00000000000001c0 - DW_CFA_def_cfa_offset: 16 - DW_CFA_advance_loc: 6 to 00000000000001b6 - DW_CFA_def_cfa_offset: 24 - DW_CFA_advance_loc: 10 to 00000000000001c0 - DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit5; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+58 0000000000000010 0000005c FDE cie=00000000 pc=00000000000001c0..00000000000001c8 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - - -Disassembly of section .plt: - -0+1b0 <.plt>: - +[a-f0-9]+: ff 35 3a fe 3f 00 push 0x3ffe3a\(%rip\) # 3ffff0 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 3b fe 3f 00 bnd jmp \*0x3ffe3b\(%rip\) # 3ffff8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -Disassembly of section .plt.got: - -0+1c0 <func@plt>: - +[a-f0-9]+: f2 ff 25 19 fe 3f 00 bnd jmp \*0x3ffe19\(%rip\) # 3fffe0 <func> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+1c8 <foo>: - +[a-f0-9]+: e8 f3 ff ff ff call 1c0 <func@plt> - +[a-f0-9]+: 48 8b 05 0c fe 3f 00 mov 0x3ffe0c\(%rip\),%rax # 3fffe0 <func> -#pass diff --git a/ld/testsuite/ld-x86-64/pr21038a.s b/ld/testsuite/ld-x86-64/pr21038a.s deleted file mode 100644 index d9a1b4c..0000000 --- a/ld/testsuite/ld-x86-64/pr21038a.s +++ /dev/null @@ -1,8 +0,0 @@ - .text - .globl foo - .type foo, @function -foo: - .cfi_startproc - call func@plt - movq func@GOTPCREL(%rip), %rax - .cfi_endproc diff --git a/ld/testsuite/ld-x86-64/pr21038b-now.d b/ld/testsuite/ld-x86-64/pr21038b-now.d deleted file mode 100644 index 72e5109..0000000 --- a/ld/testsuite/ld-x86-64/pr21038b-now.d +++ /dev/null @@ -1,70 +0,0 @@ -#name: PR ld/21038 (.plt.sec, -z now) -#source: pr21038b.s -#as: --64 -#ld: -z now -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw -Wf - -.*: +file format .* - -Contents of the .eh_frame section: - - -0+ 0000000000000014 00000000 CIE - Version: 1 - Augmentation: "zR" - Code alignment factor: 1 - Data alignment factor: -8 - Return address column: 16 - Augmentation data: 1b - DW_CFA_def_cfa: r7 \(rsp\) ofs 8 - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop - -0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+30 0000000000000024 00000034 FDE cie=00000000 pc=00000000000001b0..00000000000001d0 - DW_CFA_def_cfa_offset: 16 - DW_CFA_advance_loc: 6 to 00000000000001b6 - DW_CFA_def_cfa_offset: 24 - DW_CFA_advance_loc: 10 to 00000000000001c0 - DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit5; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+58 0000000000000010 0000005c FDE cie=00000000 pc=00000000000001d0..00000000000001d8 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - - -Disassembly of section .plt: - -0+1b0 <.plt>: - +[a-f0-9]+: ff 35 32 fe 3f 00 push 0x3ffe32\(%rip\) # 3fffe8 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 33 fe 3f 00 bnd jmp \*0x3ffe33\(%rip\) # 3ffff0 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 1b0 <func@plt-0x20> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+1d0 <func@plt>: - +[a-f0-9]+: f2 ff 25 21 fe 3f 00 bnd jmp \*0x3ffe21\(%rip\) # 3ffff8 <func> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+1d8 <foo>: - +[a-f0-9]+: e8 f3 ff ff ff call 1d0 <func@plt> -#pass diff --git a/ld/testsuite/ld-x86-64/pr21038b.d b/ld/testsuite/ld-x86-64/pr21038b.d deleted file mode 100644 index 0e77d2c..0000000 --- a/ld/testsuite/ld-x86-64/pr21038b.d +++ /dev/null @@ -1,69 +0,0 @@ -#name: PR ld/21038 (.plt.sec) -#as: --64 -#ld: -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code -#objdump: -dw -Wf - -.*: +file format .* - -Contents of the .eh_frame section: - - -0+ 0000000000000014 00000000 CIE - Version: 1 - Augmentation: "zR" - Code alignment factor: 1 - Data alignment factor: -8 - Return address column: 16 - Augmentation data: 1b - DW_CFA_def_cfa: r7 \(rsp\) ofs 8 - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop - -0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+30 0000000000000024 00000034 FDE cie=00000000 pc=00000000000001b0..00000000000001d0 - DW_CFA_def_cfa_offset: 16 - DW_CFA_advance_loc: 6 to 00000000000001b6 - DW_CFA_def_cfa_offset: 24 - DW_CFA_advance_loc: 10 to 00000000000001c0 - DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit5; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+58 0000000000000010 0000005c FDE cie=00000000 pc=00000000000001d0..00000000000001d8 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - - -Disassembly of section .plt: - -0+1b0 <.plt>: - +[a-f0-9]+: ff 35 3a fe 3f 00 push 0x3ffe3a\(%rip\) # 3ffff0 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 3b fe 3f 00 bnd jmp \*0x3ffe3b\(%rip\) # 3ffff8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 1b0 <func@plt-0x20> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.sec: - -0+1d0 <func@plt>: - +[a-f0-9]+: f2 ff 25 29 fe 3f 00 bnd jmp \*0x3ffe29\(%rip\) # 400000 <func> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+1d8 <foo>: - +[a-f0-9]+: e8 f3 ff ff ff call 1d0 <func@plt> -#pass diff --git a/ld/testsuite/ld-x86-64/pr21038b.s b/ld/testsuite/ld-x86-64/pr21038b.s deleted file mode 100644 index 3a8fc47..0000000 --- a/ld/testsuite/ld-x86-64/pr21038b.s +++ /dev/null @@ -1,7 +0,0 @@ - .text - .globl foo - .type foo, @function -foo: - .cfi_startproc - call func@plt - .cfi_endproc diff --git a/ld/testsuite/ld-x86-64/pr21038c-now.d b/ld/testsuite/ld-x86-64/pr21038c-now.d deleted file mode 100644 index cda1c44..0000000 --- a/ld/testsuite/ld-x86-64/pr21038c-now.d +++ /dev/null @@ -1,87 +0,0 @@ -#name: PR ld/21038 (.plt.got and .plt.sec, -z now) -#source: pr21038c.s -#as: --64 -#ld: -z now -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw -Wf - -.*: +file format .* - -Contents of the .eh_frame section: - - -0+ 0000000000000014 00000000 CIE - Version: 1 - Augmentation: "zR" - Code alignment factor: 1 - Data alignment factor: -8 - Return address column: 16 - Augmentation data: 1b - DW_CFA_def_cfa: r7 \(rsp\) ofs 8 - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop - -0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+30 0000000000000024 00000034 FDE cie=00000000 pc=00000000000001f0..0000000000000210 - DW_CFA_def_cfa_offset: 16 - DW_CFA_advance_loc: 6 to 00000000000001f6 - DW_CFA_def_cfa_offset: 24 - DW_CFA_advance_loc: 10 to 0000000000000200 - DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit5; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000210..0000000000000218 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+70 0000000000000010 00000074 FDE cie=00000000 pc=0000000000000218..0000000000000220 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - - -Disassembly of section .plt: - -0+1f0 <.plt>: - +[a-f0-9]+: ff 35 ea fd 3f 00 push 0x3ffdea\(%rip\) # 3fffe0 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 eb fd 3f 00 bnd jmp \*0x3ffdeb\(%rip\) # 3fffe8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 1f0 <func1@plt-0x20> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.got: - -0+210 <func1@plt>: - +[a-f0-9]+: f2 ff 25 e1 fd 3f 00 bnd jmp \*0x3ffde1\(%rip\) # 3ffff8 <func1> - +[a-f0-9]+: 90 nop - -Disassembly of section .plt.sec: - -0+218 <func2@plt>: - +[a-f0-9]+: f2 ff 25 d1 fd 3f 00 bnd jmp \*0x3ffdd1\(%rip\) # 3ffff0 <func2> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+220 <foo>: - +[a-f0-9]+: e8 eb ff ff ff call 210 <func1@plt> - +[a-f0-9]+: e8 ee ff ff ff call 218 <func2@plt> - +[a-f0-9]+: 48 8b 05 c7 fd 3f 00 mov 0x3ffdc7\(%rip\),%rax # 3ffff8 <func1> -#pass diff --git a/ld/testsuite/ld-x86-64/pr21038c.d b/ld/testsuite/ld-x86-64/pr21038c.d deleted file mode 100644 index afbdb56..0000000 --- a/ld/testsuite/ld-x86-64/pr21038c.d +++ /dev/null @@ -1,86 +0,0 @@ -#name: PR ld/21038 (.plt.got and .plt.sec) -#as: --64 -#ld: -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS -#objdump: -dw -Wf - -.*: +file format .* - -Contents of the .eh_frame section: - - -0+ 0000000000000014 00000000 CIE - Version: 1 - Augmentation: "zR" - Code alignment factor: 1 - Data alignment factor: -8 - Return address column: 16 - Augmentation data: 1b - DW_CFA_def_cfa: r7 \(rsp\) ofs 8 - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop - -0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+30 0000000000000024 00000034 FDE cie=00000000 pc=00000000000001f0..0000000000000210 - DW_CFA_def_cfa_offset: 16 - DW_CFA_advance_loc: 6 to 00000000000001f6 - DW_CFA_def_cfa_offset: 24 - DW_CFA_advance_loc: 10 to 0000000000000200 - DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit5; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000210..0000000000000218 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - -0+70 0000000000000010 00000074 FDE cie=00000000 pc=0000000000000218..0000000000000220 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - - -Disassembly of section .plt: - -0+1f0 <.plt>: - +[a-f0-9]+: ff 35 fa fd 3f 00 push 0x3ffdfa\(%rip\) # 3ffff0 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: f2 ff 25 fb fd 3f 00 bnd jmp \*0x3ffdfb\(%rip\) # 3ffff8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: 68 00 00 00 00 push \$0x0 - +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 1f0 <func1@plt-0x20> - +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.got: - -0+210 <func1@plt>: - +[a-f0-9]+: f2 ff 25 c9 fd 3f 00 bnd jmp \*0x3ffdc9\(%rip\) # 3fffe0 <func1> - +[a-f0-9]+: 90 nop - -Disassembly of section .plt.sec: - -0+218 <func2@plt>: - +[a-f0-9]+: f2 ff 25 e1 fd 3f 00 bnd jmp \*0x3ffde1\(%rip\) # 400000 <func2> - +[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+220 <foo>: - +[a-f0-9]+: e8 eb ff ff ff call 210 <func1@plt> - +[a-f0-9]+: e8 ee ff ff ff call 218 <func2@plt> - +[a-f0-9]+: 48 8b 05 af fd 3f 00 mov 0x3ffdaf\(%rip\),%rax # 3fffe0 <func1> -#pass diff --git a/ld/testsuite/ld-x86-64/pr21038c.s b/ld/testsuite/ld-x86-64/pr21038c.s deleted file mode 100644 index 38fc10d..0000000 --- a/ld/testsuite/ld-x86-64/pr21038c.s +++ /dev/null @@ -1,9 +0,0 @@ - .text - .globl foo - .type foo, @function -foo: - .cfi_startproc - call func1@plt - call func2@plt - movq func1@GOTPCREL(%rip), %rax - .cfi_endproc diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index e30f210..6bee767 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -2002,130 +2002,6 @@ if { [isnative] && [check_compiler_available] } { ] } - if { [istarget "x86_64-*-linux*"] \ - && ![istarget "x86_64-*-linux*-gnux32"]} { - - run_cc_link_tests [list \ - [list \ - "Build plt-main with -z bndplt" \ - "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ - tmpdir/plt-main4.o tmpdir/libplt-lib.so -Wl,-z,bndplt \ - -Wl,-z,noseparate-code,-z,max-page-size=0x200000" \ - "-Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \ - { plt-main5.c } \ - {{objdump {-drw} plt-main-bnd.dd}} \ - "plt-main-bnd" \ - ] \ - [list \ - "Build plt-main with PIE and -z bndplt" \ - "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ - tmpdir/plt-main4.o tmpdir/libplt-lib.so -pie \ - -Wl,-z,bndplt,-z,noseparate-code \ - -Wl,-z,max-page-size=0x200000" \ - "-fPIC -Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \ - { plt-main5.c } \ - {{objdump {-drw} plt-main-bnd.dd}} \ - "plt-main-pie-bnd" \ - ] \ - [list \ - "Build plt-main with -z bndplt -z now" \ - "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ - tmpdir/plt-main4.o tmpdir/libplt-lib.so -Wl,-z,bndplt \ - -Wl,-z,now,-z,noseparate-code,-z,max-page-size=0x200000" \ - "-Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \ - { plt-main5.c } \ - {{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \ - "plt-main-bnd-now" \ - ] \ - [list \ - "Build plt-main with PIE and -z bndplt -z now" \ - "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ - tmpdir/plt-main4.o tmpdir/libplt-lib.so -pie \ - -Wl,-z,bndplt,-z,now,-z,noseparate-code \ - -Wl,-z,max-page-size=0x200000" \ - "-fPIC -Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \ - { plt-main5.c } \ - {{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \ - "plt-main-pie-bnd-now" \ - ] \ - ] - - run_ld_link_exec_tests [list \ - [list \ - "Run plt-main with -z bndplt" \ - "-Wl,--no-as-needed,-z,bndplt tmpdir/plt-main1.o \ - tmpdir/plt-main2.o tmpdir/plt-main3.o \ - tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ - "-Wa,-mx86-used-note=yes" \ - { plt-main5.c } \ - "plt-main-bnd" \ - "plt-main.out" \ - ] \ - [list \ - "Run plt-main with PIE and -z bndplt" \ - "-Wl,--no-as-needed,-z,bndplt -pie tmpdir/plt-main1.o \ - tmpdir/plt-main2.o tmpdir/plt-main3.o \ - tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ - "-Wa,-mx86-used-note=yes" \ - { plt-main5.c } \ - "plt-main-pie-bnd" \ - "plt-main.out" \ - "-fPIC" \ - ] \ - [list \ - "Run plt-main with -z bndplt -z now" \ - "-Wl,--no-as-needed,-z,bndplt,-z,now tmpdir/plt-main1.o \ - tmpdir/plt-main2.o tmpdir/plt-main3.o \ - tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ - "-Wa,-mx86-used-note=yes" \ - { plt-main5.c } \ - "plt-main-bnd-now" \ - "plt-main.out" \ - ] \ - [list \ - "Run plt-main with PIE and -z bndplt -z now" \ - "-Wl,--no-as-needed,-z,bndplt,-z,now -pie tmpdir/plt-main1.o \ - tmpdir/plt-main2.o tmpdir/plt-main3.o \ - tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ - "-Wa,-mx86-used-note=yes" \ - { plt-main5.c } \ - "plt-main-pie-bnd-now" \ - "plt-main.out" \ - "-fPIC" \ - ] \ - [list \ - "Run pr20800" \ - "-Wl,-z,now -pie" \ - "-Wa,-mx86-used-note=yes" \ - { pr20800a.S pr20800b.S } \ - "pr20800" \ - "pass.out" \ - ] \ - ] - if { [check_ifunc_attribute_available] } { - run_ld_link_exec_tests [list \ - [list \ - "Run pr21481a" \ - "$NOPIE_LDFLAGS -Wl,-z,bndplt" \ - "-Wa,-mx86-used-note=yes" \ - { pr21481a.c pr21481b.S } \ - "pr21481a" \ - "pass.out" \ - "$NOPIE_CFLAGS" \ - ] \ - [list \ - "Run pr21481b" \ - "$NOPIE_LDFLAGS -Wl,-z,bndplt,-z,now" \ - "-Wa,-mx86-used-note=yes" \ - { pr21481a.c pr21481b.S } \ - "pr21481b" \ - "pass.out" \ - "$NOPIE_CFLAGS" \ - ] \ - ] - } - } - if { [istarget "x86_64-*-linux*"] } { set pltdump {{objdump {-drw} plt-main-ibt.dd}} set pltsecdump {{readelf {-SW} plt-main-ibt-now.rd} {objdump {-drw} plt-main-ibt.dd}} @@ -2331,14 +2207,8 @@ run_dump_test "pltgot-1" run_dump_test "pltgot-2" run_dump_test "pr20830a" run_dump_test "pr20830b" -run_dump_test "pr21038a" -run_dump_test "pr21038b" -run_dump_test "pr21038c" run_dump_test "pr20830a-now" run_dump_test "pr20830b-now" -run_dump_test "pr21038a-now" -run_dump_test "pr21038b-now" -run_dump_test "pr21038c-now" run_dump_test "ibt-plt-1" run_dump_test "ibt-plt-1-x32" run_dump_test "ibt-plt-2a" |