summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Malcomson <matthew.malcomson@arm.com>2022-03-07 18:10:56 +0000
committerMatthew Malcomson <matthew.malcomson@arm.com>2022-03-07 18:10:56 +0000
commit49432a1df068164f265ab9c6bf4d86f5e984762c (patch)
tree7f06004213502c23e1777443ebe60d6545db812d
parent47b9119833ab8bcda04c8397293cccd71d5a4efe (diff)
downloadbinutils-gdb-49432a1df068164f265ab9c6bf4d86f5e984762c.tar.gz
Fix c64-ifunc-2 test
This was newly failing because it was checking for a value *without* the LSB set. In a recent commit we have fixed the bug which lost the LSB, and that caused this test to fail. Here we use the new testsuite implementation to test for "one plus the location" rather than "one of the values A, B, C, ...", which is a better representation of what we're trying to check.
-rw-r--r--ld/testsuite/ld-aarch64/c64-ifunc-2.d13
1 files changed, 10 insertions, 3 deletions
diff --git a/ld/testsuite/ld-aarch64/c64-ifunc-2.d b/ld/testsuite/ld-aarch64/c64-ifunc-2.d
index b87908b27a4..2954f67b0c5 100644
--- a/ld/testsuite/ld-aarch64/c64-ifunc-2.d
+++ b/ld/testsuite/ld-aarch64/c64-ifunc-2.d
@@ -4,10 +4,17 @@
#objdump: -dw
#source: ifunc-2.s
+#record: INDIRECT_LOC FOO_LOCATION
#...
-0+(130|1a0|1c8|1e0) <foo>:
+0+([0-9a-f]{3}).*0x([0-9a-f]{3})@plt>:
#...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8|1e0)@plt>
+Disassembly of section \.text:
+
+#check: FOO_LOC string tolower $FOO_LOCATION
+#check: INDIRECT_POS format %x [expr "0x$INDIRECT_LOC + 1"]
+0+FOO_LOC <foo>:
+#...
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0xFOO_LOC@plt>
[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+c0, 0 <.*>
-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+c0, c0, #0x(120|190|1b8|1d0)
+[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+c0, c0, #0xINDIRECT_POS
#pass