[PATCH] gold: Update x86-64 tests
H.J. Lu
hjl.tools@gmail.com
Sun Jul 19 14:17:19 GMT 2020
commit 36938cabf0efcb053d1585e8580a4b3db438ca4e
Author: Jan Beulich <jbeulich@suse.com>
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 f7520ba3cd..81db095c48 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,10 @@
+2020-07-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * 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 <nickc@redhat.com>
* 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 98871bfbd4..fe77c75143 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 06858148c1..7a2207ef05 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 33bb4892ed..afde87d84d 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 d97a5fe681..e0474bc580 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]\+ <foo>" x86_64_indirect_call_to_direct1.stdout
-grep -q "jmpq[ ]\+[a-f0-9]\+ <foo>" x86_64_indirect_jump_to_direct1.stdout
+grep -q "call[ ]\+[a-f0-9]\+ <foo>" x86_64_indirect_call_to_direct1.stdout
+grep -q "jmp[ ]\+[a-f0-9]\+ <foo>" x86_64_indirect_jump_to_direct1.stdout
--
2.26.2
More information about the Binutils
mailing list