From 9e6b97601b02411c0ee29113898ae7e2f59cbf0e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 19 Jul 2020 07:14:47 -0700 Subject: [PATCH] gold: Update x86-64 tests commit 36938cabf0efcb053d1585e8580a4b3db438ca4e Author: Jan Beulich Date: Wed Jul 15 08:53:55 2020 +0200 x86: avoid attaching suffixes to unambiguous insns removed the 'a' suffix on call and jmp from disassembler output. Update gold x86-64 tests. * testsuite/bnd_ifunc_1.sh: Updated. * testsuite/bnd_plt_1.sh: Likewise. * testsuite/split_x86_64.sh: Likewise. * testsuite/x86_64_indirect_call_to_direct.sh: Likewise. --- gold/ChangeLog | 7 +++++++ gold/testsuite/bnd_ifunc_1.sh | 6 +++--- gold/testsuite/bnd_plt_1.sh | 10 +++++----- gold/testsuite/split_x86_64.sh | 8 ++++---- gold/testsuite/x86_64_indirect_call_to_direct.sh | 4 ++-- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index f7520ba3cdc..81db095c486 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,10 @@ +2020-07-19 H.J. Lu + + * testsuite/bnd_ifunc_1.sh: Updated. + * testsuite/bnd_plt_1.sh: Likewise. + * testsuite/split_x86_64.sh: Likewise. + * testsuite/x86_64_indirect_call_to_direct.sh: Likewise. + 2020-07-08 Nick Clifton * testsuite/script_test_7.sh: Adjust expected address of the .bss diff --git a/gold/testsuite/bnd_ifunc_1.sh b/gold/testsuite/bnd_ifunc_1.sh index 98871bfbd48..fe77c75143c 100755 --- a/gold/testsuite/bnd_ifunc_1.sh +++ b/gold/testsuite/bnd_ifunc_1.sh @@ -30,7 +30,7 @@ match() fi } -match '[0-9a-f]*:.*bnd jmpq \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x18>' bnd_ifunc_1.stdout -APLT_ADDR=$(egrep '[0-9a-f]*:.*bnd jmpq \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x18>' bnd_ifunc_1.stdout | +match '[0-9a-f]*:.*bnd jmp \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x18>' bnd_ifunc_1.stdout +APLT_ADDR=$(egrep '[0-9a-f]*:.*bnd jmp \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x18>' bnd_ifunc_1.stdout | sed -e 's/ *\([0-9a-f]*\):.*/\1/') -match "bnd callq $APLT_ADDR" bnd_ifunc_1.stdout +match "bnd call $APLT_ADDR" bnd_ifunc_1.stdout diff --git a/gold/testsuite/bnd_plt_1.sh b/gold/testsuite/bnd_plt_1.sh index 06858148c14..7a2207ef053 100755 --- a/gold/testsuite/bnd_plt_1.sh +++ b/gold/testsuite/bnd_plt_1.sh @@ -37,16 +37,16 @@ get_plt() } # Extract the addresses of the indirect jumps, omitting the PLT0 entry. -get_aplt_jmpq_addresses() +get_aplt_jmp_addresses() { sed -n -e '/_GLOBAL_OFFSET_TABLE_+0x10/d' \ - -e '/bnd jmpq \*0x[0-9a-f]*(%rip)/p' | + -e '/bnd jmp \*0x[0-9a-f]*(%rip)/p' | sed -e 's/ *\([0-9a-f]*\):.*/\1/' } -match 'bnd jmpq \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x10>' bnd_plt_1.stdout +match 'bnd jmp \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x10>' bnd_plt_1.stdout -for APLT_ADDR in $(get_plt < bnd_ifunc_2.stdout | get_aplt_jmpq_addresses) +for APLT_ADDR in $(get_plt < bnd_ifunc_2.stdout | get_aplt_jmp_addresses) do - match "bnd (callq|jmpq) $APLT_ADDR" bnd_ifunc_2.stdout + match "bnd (call|jmp) $APLT_ADDR" bnd_ifunc_2.stdout done diff --git a/gold/testsuite/split_x86_64.sh b/gold/testsuite/split_x86_64.sh index 33bb4892ed6..afde87d84dd 100755 --- a/gold/testsuite/split_x86_64.sh +++ b/gold/testsuite/split_x86_64.sh @@ -39,16 +39,16 @@ nomatch() } match 'cmp.*%fs:[^,]*,%rsp' split_x86_64_1.stdout -match 'callq.*__morestack>?$' split_x86_64_1.stdout +match 'call.*__morestack>?$' split_x86_64_1.stdout match 'lea.*-0x200\(%rsp\),' split_x86_64_1.stdout match 'stc' split_x86_64_2.stdout -match 'callq.*__morestack_non_split>?$' split_x86_64_2.stdout -nomatch 'callq.*__morestack>?$' split_x86_64_2.stdout +match 'call.*__morestack_non_split>?$' split_x86_64_2.stdout +nomatch 'call.*__morestack>?$' split_x86_64_2.stdout match 'lea.*-0x4200\(%rsp\),' split_x86_64_2.stdout match 'failed to match' split_x86_64_3.stdout -match 'callq.*__morestack>?$' split_x86_64_4.stdout +match 'call.*__morestack>?$' split_x86_64_4.stdout match 'cannot mix' split_x86_64_r.stdout diff --git a/gold/testsuite/x86_64_indirect_call_to_direct.sh b/gold/testsuite/x86_64_indirect_call_to_direct.sh index d97a5fe681b..e0474bc5803 100755 --- a/gold/testsuite/x86_64_indirect_call_to_direct.sh +++ b/gold/testsuite/x86_64_indirect_call_to_direct.sh @@ -25,5 +25,5 @@ set -e -grep -q "callq[ ]\+[a-f0-9]\+ " x86_64_indirect_call_to_direct1.stdout -grep -q "jmpq[ ]\+[a-f0-9]\+ " x86_64_indirect_jump_to_direct1.stdout +grep -q "call[ ]\+[a-f0-9]\+ " x86_64_indirect_call_to_direct1.stdout +grep -q "jmp[ ]\+[a-f0-9]\+ " x86_64_indirect_jump_to_direct1.stdout -- 2.30.2