From: Jens Remus Date: Thu, 4 Jul 2024 08:34:12 +0000 (+0200) Subject: gas: Don't skip SFrame FDE if .cfi_register specifies RA w/o tracking X-Git-Tag: binutils-2_43~206 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df174a6b760ac5c66ee62ecb872c760ae21fd4cd;p=thirdparty%2Fbinutils-gdb.git gas: Don't skip SFrame FDE if .cfi_register specifies RA w/o tracking Do not skip SFrame FDE if .cfi_register specifies RA register without RA tracking being actually used. Without RA tracking the register contents can always be restored from the stack using the fixed RA offset from CFA. gas/ * gen-sframe.c (sframe_xlate_do_register): Do not skip SFrame FDE if .cfi_register specifies RA register without RA tracking being used. Signed-off-by: Jens Remus --- diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c index 2222d768799..31f2e511828 100644 --- a/gas/gen-sframe.c +++ b/gas/gen-sframe.c @@ -1158,7 +1158,7 @@ sframe_xlate_do_register (struct sframe_xlate_ctx *xlate_ctx ATTRIBUTE_UNUSED, stack trace information. */ if (cfi_insn->u.rr.reg1 == SFRAME_CFA_SP_REG #ifdef SFRAME_FRE_RA_TRACKING - || (cfi_insn->u.rr.reg1 == SFRAME_CFA_RA_REG) + || (sframe_ra_tracking_p () && cfi_insn->u.rr.reg1 == SFRAME_CFA_RA_REG) #endif || cfi_insn->u.rr.reg1 == SFRAME_CFA_FP_REG) {