
Do not generate SFrame FDE if DWARF CFI directives .cfi_def_cfa or .cfi_def_cfa_register specify a CFA base register number other than the architecture-specific stack-pointer (SP) or frame-pointer (FP) register numbers. This also causes the assembler to print a warning message, so that skipping of the SFrame FDE does not occur silently. Update the generic ld SFrame test case to be architecture independent. Do not use CFI directive .cfi_def_cfa, as the specified CFA base register number is not a valid SP/FP register number on all architectures. An invalid SP/FP register number will now cause the assembler to print a warning message and skip SFrame FDE generation. Remove the offending CFI directive, that cannot be coded architecture- independent, as the test case requires SFrame information to be generated. This was reported by the Linaro-TCWG-CI for AArch64. gas/ * gen-sframe.c: Skip SFrame generation if CFI specifies non-FP/SP base register. ld/testsuite/ * ld-sframe/discard.s: Update generic SFrame test case to be architecture independent. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
12 lines
160 B
ArmAsm
12 lines
160 B
ArmAsm
.text
|
|
.cfi_sections .sframe
|
|
.globl foo
|
|
.type foo, @function
|
|
foo:
|
|
.cfi_startproc
|
|
.cfi_def_cfa_offset 16
|
|
.cfi_endproc
|
|
|
|
.globl _start
|
|
_start:
|
|
.long foo
|