3497c0bec9
[ Upstream commit b961ec10b9f9719987470236feb50c967db5a652 ] The return-address (RA) register r14 is specified as volatile in the s390x ELF ABI [1]. Nevertheless proper CFI directives must be provided for an unwinder to restore the return address, if the RA register value is changed from its value at function entry, as it is the case. [1]: s390x ELF ABI, https://github.com/IBM/s390x-abi/releases Fixes: 4bff8cb54502 ("s390: convert to GENERIC_VDSO") Signed-off-by: Jens Remus <jremus@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
38 lines
952 B
C
Executable file
38 lines
952 B
C
Executable file
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_S390_DWARF_H
|
|
#define _ASM_S390_DWARF_H
|
|
|
|
#ifdef __ASSEMBLY__
|
|
|
|
#define CFI_STARTPROC .cfi_startproc
|
|
#define CFI_ENDPROC .cfi_endproc
|
|
#define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset
|
|
#define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset
|
|
#define CFI_RESTORE .cfi_restore
|
|
#define CFI_REL_OFFSET .cfi_rel_offset
|
|
|
|
#ifdef CONFIG_AS_CFI_VAL_OFFSET
|
|
#define CFI_VAL_OFFSET .cfi_val_offset
|
|
#else
|
|
#define CFI_VAL_OFFSET #
|
|
#endif
|
|
|
|
#ifndef BUILD_VDSO
|
|
/*
|
|
* Emit CFI data in .debug_frame sections and not in .eh_frame
|
|
* sections. The .eh_frame CFI is used for runtime unwind
|
|
* information that is not being used. Hence, vmlinux.lds.S
|
|
* can discard the .eh_frame sections.
|
|
*/
|
|
.cfi_sections .debug_frame
|
|
#else
|
|
/*
|
|
* For vDSO, emit CFI data in both, .eh_frame and .debug_frame
|
|
* sections.
|
|
*/
|
|
.cfi_sections .eh_frame, .debug_frame
|
|
#endif
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* _ASM_S390_DWARF_H */
|