aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorJens Remus <jremus@linux.ibm.com>2024-07-04 10:34:12 +0200
committerJens Remus <jremus@linux.ibm.com>2024-07-04 10:34:12 +0200
commit5c7f6da4323c6e7c74ad2b89c92794438a2c0e13 (patch)
treefbde9726f71b1b23e13942528baadf8d613aec87 /ld/testsuite
parent76f05e1dfb37406821d545ad3099d874b79f9b7b (diff)
downloadgdb-5c7f6da4323c6e7c74ad2b89c92794438a2c0e13.zip
gdb-5c7f6da4323c6e7c74ad2b89c92794438a2c0e13.tar.gz
gdb-5c7f6da4323c6e7c74ad2b89c92794438a2c0e13.tar.bz2
readelf/objdump: Display SFrame fixed RA offset as 'f' in dump
For the SFrame FRE frame-pointer (FP) offset from CFA a 'u' is displayed if it is unavailable. For the SFrame FRE return-address (RA) offset from CFA a 'u' was displayed if the ABI uses a fixed RA offset from CFA. By chance a 'u' was also displayed if the RA offset is unavailable, as the string buffer was not initialized after formatting the FP offset. Note that it could not occur that the FP offset was erroneously displayed as RA offset, as the SFrame format cannot have a FRE with FP offset without RA offset. For the FRE RA offset display 'f' if the ABI uses a fixed RA offset from CFA. Display a 'u' if it is unavailable. libsframe/ * sframe-dump.c: Display SFrame fixed RA offset as 'f' in dump. gas/testsuite/ * gas/cfi-sframe/cfi-sframe-common-4.d: Test for RA displayed either as 'u' (if RA tracking) or as 'f' (fixed RA offset if no RA tracking). * gas/cfi-sframe/cfi-sframe-common-5.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-6.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-7.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-8.d: Likewise. * gas/cfi-sframe/cfi-sframe-x86_64-1.d: Test for RA displayed as 'f' (fixed RA offset), as x86-64 does not use RA tracking. * gas/scfi/x86_64/scfi-cfi-sections-1.d: Likewise. * gas/scfi/x86_64/scfi-dyn-stack-1.d: Likewise. ld/testsuite/ * ld-x86-64/sframe-plt-1.d: Test for RA displayed as 'f' (fixed RA offset), as x86-64 does not use RA tracking. * ld-x86-64/sframe-simple-1.d: Likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ld-x86-64/sframe-plt-1.d8
-rw-r--r--ld/testsuite/ld-x86-64/sframe-simple-1.d16
2 files changed, 12 insertions, 12 deletions
diff --git a/ld/testsuite/ld-x86-64/sframe-plt-1.d b/ld/testsuite/ld-x86-64/sframe-plt-1.d
index 6aea5f4..52bca18 100644
--- a/ld/testsuite/ld-x86-64/sframe-plt-1.d
+++ b/ld/testsuite/ld-x86-64/sframe-plt-1.d
@@ -19,12 +19,12 @@ Contents of the SFrame section .sframe:
func idx \[0\]: pc = 0x1000, size = 16 bytes
STARTPC +CFA +FP +RA +
- 0+1000 +sp\+16 +u +u +
- 0+1006 +sp\+24 +u +u +
+ 0+1000 +sp\+16 +u +f +
+ 0+1006 +sp\+24 +u +f +
func idx \[1\]: pc = 0x1010, size = 16 bytes
STARTPC\[m\] +CFA +FP +RA +
- 0+0000 +sp\+8 +u +u +
- 0+000b +sp\+16 +u +u +
+ 0+0000 +sp\+8 +u +f +
+ 0+000b +sp\+16 +u +f +
#...
diff --git a/ld/testsuite/ld-x86-64/sframe-simple-1.d b/ld/testsuite/ld-x86-64/sframe-simple-1.d
index 5ffd0ca..7d88419 100644
--- a/ld/testsuite/ld-x86-64/sframe-simple-1.d
+++ b/ld/testsuite/ld-x86-64/sframe-simple-1.d
@@ -23,14 +23,14 @@ Contents of the SFrame section .sframe:
func idx \[2\]: pc = 0x1020, size = 53 bytes
STARTPC +CFA +FP +RA +
- 0+1020 +sp\+8 +u +u +
- 0+1021 +sp\+16 +c-16 +u +
- 0+1024 +fp\+16 +c-16 +u +
- 0+1054 +sp\+8 +c-16 +u +
+ 0+1020 +sp\+8 +u +f +
+ 0+1021 +sp\+16 +c-16 +f +
+ 0+1024 +fp\+16 +c-16 +f +
+ 0+1054 +sp\+8 +c-16 +f +
func idx \[3\]: pc = 0x1055, size = 37 bytes
STARTPC +CFA +FP +RA +
- 0+1055 +sp\+8 +u +u +
- 0+1056 +sp\+16 +c-16 +u +
- 0+1059 +fp\+16 +c-16 +u +
- 0+1079 +sp\+8 +c-16 +u +
+ 0+1055 +sp\+8 +u +f +
+ 0+1056 +sp\+16 +c-16 +f +
+ 0+1059 +fp\+16 +c-16 +f +
+ 0+1079 +sp\+8 +c-16 +f +