| .. | .. |
|---|
| 71 | 71 | static void __used __section(".discard.func_stack_frame_non_standard") \ |
|---|
| 72 | 72 | *__func_stack_frame_non_standard_##func = func |
|---|
| 73 | 73 | |
|---|
| 74 | +/* |
|---|
| 75 | + * STACK_FRAME_NON_STANDARD_FP() is a frame-pointer-specific function ignore |
|---|
| 76 | + * for the case where a function is intentionally missing frame pointer setup, |
|---|
| 77 | + * but otherwise needs objtool/ORC coverage when frame pointers are disabled. |
|---|
| 78 | + */ |
|---|
| 79 | +#ifdef CONFIG_FRAME_POINTER |
|---|
| 80 | +#define STACK_FRAME_NON_STANDARD_FP(func) STACK_FRAME_NON_STANDARD(func) |
|---|
| 81 | +#else |
|---|
| 82 | +#define STACK_FRAME_NON_STANDARD_FP(func) |
|---|
| 83 | +#endif |
|---|
| 84 | + |
|---|
| 85 | +#define ANNOTATE_NOENDBR \ |
|---|
| 86 | + "986: \n\t" \ |
|---|
| 87 | + ".pushsection .discard.noendbr\n\t" \ |
|---|
| 88 | + _ASM_PTR " 986b\n\t" \ |
|---|
| 89 | + ".popsection\n\t" |
|---|
| 90 | + |
|---|
| 74 | 91 | #else /* __ASSEMBLY__ */ |
|---|
| 75 | 92 | |
|---|
| 76 | 93 | /* |
|---|
| .. | .. |
|---|
| 117 | 134 | .popsection |
|---|
| 118 | 135 | .endm |
|---|
| 119 | 136 | |
|---|
| 137 | +.macro ANNOTATE_NOENDBR |
|---|
| 138 | +.Lhere_\@: |
|---|
| 139 | + .pushsection .discard.noendbr |
|---|
| 140 | + .quad .Lhere_\@ |
|---|
| 141 | + .popsection |
|---|
| 142 | +.endm |
|---|
| 143 | + |
|---|
| 120 | 144 | #endif /* __ASSEMBLY__ */ |
|---|
| 121 | 145 | |
|---|
| 122 | 146 | #else /* !CONFIG_STACK_VALIDATION */ |
|---|
| .. | .. |
|---|
| 126 | 150 | #define UNWIND_HINT(sp_reg, sp_offset, type, end) \ |
|---|
| 127 | 151 | "\n\t" |
|---|
| 128 | 152 | #define STACK_FRAME_NON_STANDARD(func) |
|---|
| 153 | +#define STACK_FRAME_NON_STANDARD_FP(func) |
|---|
| 154 | +#define ANNOTATE_NOENDBR |
|---|
| 129 | 155 | #else |
|---|
| 130 | 156 | #define ANNOTATE_INTRA_FUNCTION_CALL |
|---|
| 131 | 157 | .macro UNWIND_HINT type:req sp_reg=0 sp_offset=0 end=0 |
|---|
| 132 | 158 | .endm |
|---|
| 159 | +.macro ANNOTATE_NOENDBR |
|---|
| 160 | +.endm |
|---|
| 133 | 161 | #endif |
|---|
| 134 | 162 | |
|---|
| 135 | 163 | #endif /* CONFIG_STACK_VALIDATION */ |
|---|