1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef _ASM_X86_DWARF2_H 3*4882a593Smuzhiyun #define _ASM_X86_DWARF2_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #ifndef __ASSEMBLY__ 6*4882a593Smuzhiyun #warning "asm/dwarf2.h should be only included in pure assembly files" 7*4882a593Smuzhiyun #endif 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun #define CFI_STARTPROC .cfi_startproc 10*4882a593Smuzhiyun #define CFI_ENDPROC .cfi_endproc 11*4882a593Smuzhiyun #define CFI_DEF_CFA .cfi_def_cfa 12*4882a593Smuzhiyun #define CFI_DEF_CFA_REGISTER .cfi_def_cfa_register 13*4882a593Smuzhiyun #define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset 14*4882a593Smuzhiyun #define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset 15*4882a593Smuzhiyun #define CFI_OFFSET .cfi_offset 16*4882a593Smuzhiyun #define CFI_REL_OFFSET .cfi_rel_offset 17*4882a593Smuzhiyun #define CFI_REGISTER .cfi_register 18*4882a593Smuzhiyun #define CFI_RESTORE .cfi_restore 19*4882a593Smuzhiyun #define CFI_REMEMBER_STATE .cfi_remember_state 20*4882a593Smuzhiyun #define CFI_RESTORE_STATE .cfi_restore_state 21*4882a593Smuzhiyun #define CFI_UNDEFINED .cfi_undefined 22*4882a593Smuzhiyun #define CFI_ESCAPE .cfi_escape 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun #ifndef BUILD_VDSO 25*4882a593Smuzhiyun /* 26*4882a593Smuzhiyun * Emit CFI data in .debug_frame sections, not .eh_frame sections. 27*4882a593Smuzhiyun * The latter we currently just discard since we don't do DWARF 28*4882a593Smuzhiyun * unwinding at runtime. So only the offline DWARF information is 29*4882a593Smuzhiyun * useful to anyone. Note we should not use this directive if we 30*4882a593Smuzhiyun * ever decide to enable DWARF unwinding at runtime. 31*4882a593Smuzhiyun */ 32*4882a593Smuzhiyun .cfi_sections .debug_frame 33*4882a593Smuzhiyun #else 34*4882a593Smuzhiyun /* 35*4882a593Smuzhiyun * For the vDSO, emit both runtime unwind information and debug 36*4882a593Smuzhiyun * symbols for the .dbg file. 37*4882a593Smuzhiyun */ 38*4882a593Smuzhiyun .cfi_sections .eh_frame, .debug_frame 39*4882a593Smuzhiyun #endif 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun #endif /* _ASM_X86_DWARF2_H */ 42