1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __VDSO_EXTABLE_H 3 #define __VDSO_EXTABLE_H 4 5 /* 6 * Inject exception fixup for vDSO code. Unlike normal exception fixup, 7 * vDSO uses a dedicated handler the addresses are relative to the overall 8 * exception table, not each individual entry. 9 */ 10 #ifdef __ASSEMBLY__ 11 #define _ASM_VDSO_EXTABLE_HANDLE(from, to) \ 12 ASM_VDSO_EXTABLE_HANDLE from to 13 14 .macro ASM_VDSO_EXTABLE_HANDLE from:req to:req 15 .pushsection __ex_table, "a" 16 .long (\from) - __ex_table 17 .long (\to) - __ex_table 18 .popsection 19 .endm 20 #else 21 #define _ASM_VDSO_EXTABLE_HANDLE(from, to) \ 22 ".pushsection __ex_table, \"a\"\n" \ 23 ".long (" #from ") - __ex_table\n" \ 24 ".long (" #to ") - __ex_table\n" \ 25 ".popsection\n" 26 #endif 27 28 #endif /* __VDSO_EXTABLE_H */ 29