| .. | .. |
|---|
| 13 | 13 | |
|---|
| 14 | 14 | #ifdef __ASSEMBLY__ |
|---|
| 15 | 15 | |
|---|
| 16 | | -#define GLOBAL(name) \ |
|---|
| 17 | | - .globl name; \ |
|---|
| 18 | | - name: |
|---|
| 19 | | - |
|---|
| 20 | 16 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16) |
|---|
| 21 | 17 | #define __ALIGN .p2align 4, 0x90 |
|---|
| 22 | 18 | #define __ALIGN_STR __stringify(__ALIGN) |
|---|
| 23 | 19 | #endif |
|---|
| 24 | 20 | |
|---|
| 21 | +#if defined(CONFIG_RETHUNK) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO) |
|---|
| 22 | +#define RET jmp __x86_return_thunk |
|---|
| 23 | +#else /* CONFIG_RETPOLINE */ |
|---|
| 24 | +#ifdef CONFIG_SLS |
|---|
| 25 | +#define RET ret; int3 |
|---|
| 26 | +#else |
|---|
| 27 | +#define RET ret |
|---|
| 28 | +#endif |
|---|
| 29 | +#endif /* CONFIG_RETPOLINE */ |
|---|
| 30 | + |
|---|
| 31 | +#else /* __ASSEMBLY__ */ |
|---|
| 32 | + |
|---|
| 33 | +#if defined(CONFIG_RETHUNK) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO) |
|---|
| 34 | +#define ASM_RET "jmp __x86_return_thunk\n\t" |
|---|
| 35 | +#else /* CONFIG_RETPOLINE */ |
|---|
| 36 | +#ifdef CONFIG_SLS |
|---|
| 37 | +#define ASM_RET "ret; int3\n\t" |
|---|
| 38 | +#else |
|---|
| 39 | +#define ASM_RET "ret\n\t" |
|---|
| 40 | +#endif |
|---|
| 41 | +#endif /* CONFIG_RETPOLINE */ |
|---|
| 42 | + |
|---|
| 25 | 43 | #endif /* __ASSEMBLY__ */ |
|---|
| 26 | 44 | |
|---|
| 27 | 45 | #endif /* _ASM_X86_LINKAGE_H */ |
|---|