Browse Source
As reported in PR gas/25732, some testcases currently FAIL on Solaris/x86: FAIL: x86-64 branch 2 FAIL: x86-64 branch 3 FAIL: x86-64 MPX branch FAIL: x86-64 branch with BND prefix FAIL: x86-64 jump Since https://sourceware.org/ml/binutils/2019-03/msg00163.html, gas doesn't emit R_X86_64_PLT32 as branch marker on Solaris. Since the testsuite lacks a way to preprocess dump files, adjusted copies of the affected dumps are now used on Solaris. Unfortunately, those dumps weren't adapted when the original testcases were changed or other testcases started to differ between non-Solaris and Solaris targets. The following patch fixes that, re-syncing the affected dump files or creating new Solaris-specific ones. Tested on i386-pc-solaris2.11, x86_64-pc-solaris2.11, x86_64-pc-linux-gnu, and i686-pc-linux-gnu. PR gas/25732 * testsuite/gas/i386/solaris/x86-64-branch-2.d: New file. * testsuite/gas/i386/solaris/x86-64-branch-3.d: New file. * testsuite/gas/i386/solaris/x86-64-jump.d: Incorporate changes to testsuite/gas/i386/x86-64-jump.d. * gas/testsuite/gas/i386/solaris/x86-64-mpx-branch-1.d: Incorporate changes to gas/testsuite/gas/i386/x86-64-mpx-branch-1.d. * testsuite/gas/i386/solaris/x86-64-mpx-branch-2.d : Incorporate changes to testsuite/gas/i386/x86-64-mpx-branch-2.d. * testsuite/gas/i386/x86-64-branch-2.d: Skip on *-*-solaris*. * testsuite/gas/i386/x86-64-branch-3.d: Likewise.binutils-2_35-branch
8 changed files with 92 additions and 47 deletions
@ -0,0 +1,20 @@ |
|||
#as: -J |
|||
#objdump: -dwr |
|||
#source: ../x86-64-branch-2.s |
|||
#name: x86-64 branch 2 |
|||
|
|||
.*: +file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <bar-0xb>: |
|||
[ ]*[a-f0-9]+: 66 e9 00 00 jmpw 4 <bar-0x7> 2: R_X86_64_PC16 foo-0x2 |
|||
[ ]*[a-f0-9]+: 66 48 e9 00 00 00 00 data16 jmpq b <bar> 7: R_X86_64_PC32 foo-0x4 |
|||
|
|||
0+b <bar>: |
|||
[ ]*[a-f0-9]+: 89 c3 mov %eax,%ebx |
|||
[ ]*[a-f0-9]+: 66 e8 00 00 callw 11 <bar\+0x6> f: R_X86_64_PC16 foo-0x2 |
|||
[ ]*[a-f0-9]+: 66 48 e8 00 00 00 00 data16 callq 18 <bar\+0xd> 14: R_X86_64_PC32 foo-0x4 |
|||
[ ]*[a-f0-9]+: 66 c3 retw * |
|||
[ ]*[a-f0-9]+: 66 c2 08 00 retw \$0x8 |
|||
#pass |
|||
@ -0,0 +1,22 @@ |
|||
#as: -J -mintel64 |
|||
#objdump: -dwr -Mintel64 |
|||
#source: ../x86-64-branch-3.s |
|||
#name: x86-64 branch 3 |
|||
|
|||
.*: +file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <bar-0xd>: |
|||
[ ]*[a-f0-9]+: 66 e9 00 00 00 00 data16 jmpq 6 <bar-0x7> 2: R_X86_64_PC32 foo-0x4 |
|||
[ ]*[a-f0-9]+: 66 48 e9 00 00 00 00 data16 rex\.W jmpq d <bar> 9: R_X86_64_PC32 foo-0x4 |
|||
|
|||
0+d <bar>: |
|||
[ ]*[a-f0-9]+: 89 c3 mov %eax,%ebx |
|||
[ ]*[a-f0-9]+: 66 e8 00 00 00 00 data16 callq 15 <bar\+0x8> 11: R_X86_64_PC32 foo-0x4 |
|||
[ ]*[a-f0-9]+: 66 48 e8 00 00 00 00 data16 rex\.W callq 1c <bar\+0xf> 18: R_X86_64_PC32 foo-0x4 |
|||
[ ]*[a-f0-9]+: 66 c7 f8 00 00 xbeginw 21 <bar\+0x14> 1f: R_X86_64_PC16 foo-0x2 |
|||
[ ]*[a-f0-9]+: 66 48 c7 f8 00 00 00 00 data16 xbeginq 29 <bar\+0x1c> 25: R_X86_64_PC32 foo-0x4 |
|||
[ ]*[a-f0-9]+: 48 ff 18 lcallq \*\(%rax\) |
|||
[ ]*[a-f0-9]+: 48 ff 29 ljmpq \*\(%rcx\) |
|||
#pass |
|||
@ -1,29 +1,5 @@ |
|||
#as: -J -madd-bnd-prefix |
|||
#source: ../x86-64-mpx-branch-2.s |
|||
#source: ../x86-64-mpx-branch-1.s |
|||
#objdump: -dwr |
|||
#name: x86-64 branch with BND prefix |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <foo1-0xc>: |
|||
[ ]*[a-f0-9]+: f2 e8 00 00 00 00 bnd callq 6 <foo1-0x6> 2: R_X86_64_PC32 \*ABS\*\+0x10003c |
|||
[ ]*[a-f0-9]+: f2 e9 00 00 00 00 bnd jmpq c <foo1> 8: R_X86_64_PC32 \*ABS\*\+0x10003c |
|||
|
|||
0+c <foo1>: |
|||
[ ]*[a-f0-9]+: f2 eb fd bnd jmp c <foo1> |
|||
[ ]*[a-f0-9]+: f2 72 fa bnd jb c <foo1> |
|||
[ ]*[a-f0-9]+: f2 e8 f4 ff ff ff bnd callq c <foo1> |
|||
[ ]*[a-f0-9]+: f2 eb 09 bnd jmp 24 <foo2> |
|||
[ ]*[a-f0-9]+: f2 72 06 bnd jb 24 <foo2> |
|||
[ ]*[a-f0-9]+: f2 e8 00 00 00 00 bnd callq 24 <foo2> |
|||
|
|||
0+24 <foo2>: |
|||
[ ]*[a-f0-9]+: f2 e9 00 00 00 00 bnd jmpq 2a <foo2\+0x6> 26: R_X86_64_PC32 foo-0x4 |
|||
[ ]*[a-f0-9]+: f2 0f 82 00 00 00 00 bnd jb 31 <foo2\+0xd> 2d: R_X86_64_PC32 foo-0x4 |
|||
[ ]*[a-f0-9]+: f2 e8 00 00 00 00 bnd callq 37 <foo2\+0x13> 33: R_X86_64_PC32 foo-0x4 |
|||
[ ]*[a-f0-9]+: f2 e9 00 00 00 00 bnd jmpq 3d <foo2\+0x19> 39: R_X86_64_PLT32 foo-0x4 |
|||
[ ]*[a-f0-9]+: f2 0f 82 00 00 00 00 bnd jb 44 <foo2\+0x20> 40: R_X86_64_PLT32 foo-0x4 |
|||
[ ]*[a-f0-9]+: f2 e8 00 00 00 00 bnd callq 4a <foo2\+0x26> 46: R_X86_64_PLT32 foo-0x4 |
|||
#dump: x86-64-mpx-branch-1.d |
|||
|
|||
Loading…
Reference in new issue