aboutsummaryrefslogtreecommitdiff
path: root/gprofng/src
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
commitc6024caf0ce26c149b9d0a42cf7b8ab49ee6053c (patch)
tree964a311769f9eed3508df92aa8fabbfc41a99458 /gprofng/src
parent536119a44c992036e14b512e06a12f04ea4ceed5 (diff)
downloadbinutils-c6024caf0ce26c149b9d0a42cf7b8ab49ee6053c.zip
binutils-c6024caf0ce26c149b9d0a42cf7b8ab49ee6053c.tar.gz
binutils-c6024caf0ce26c149b9d0a42cf7b8ab49ee6053c.tar.bz2
gas: Skip SFrame FDE if FP without RA on stack
The SFrame format cannot represent the frame pointer (FP) being saved on the stack without the return address (RA) also being saved on the stack, if RA tracking is used. A SFrame FDE is followed by 1-3 offsets with the following information: Without RA tracking: 1. Offset from base pointer (SP or FP) to locate the CFA 2. Optional: Offset to CFA to restore the frame pointer (FP) With RA tracking: 1. Offset from base pointer (SP or FP) to locate the CFA 2. Optional: Offset to CFA to restore the return address (RA) 3. Optional: Offset to CFA to restore the frame pointer (FP) When RA tracking is used and a FDE is followed by two offsets the SFrame format does not provide any information to distinguish whether the second offset is the RA or FP offset. SFrame assumes the offset to be the RA offset, which may be wrong. Therefore skip generation of SFrame FDE information and print the following warning, if RA tracking is used and the FP is saved on the stack without the RA being saved as well: skipping SFrame FDE; FP without RA on stack gas/ * gen-sframe.c (sframe_do_fde): Skip SFrame FDE if FP without RA on stack, as the SFrame format cannot represent this case. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Diffstat (limited to 'gprofng/src')
0 files changed, 0 insertions, 0 deletions