diff options
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r-- | include/linux/compiler-gcc.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index cd4bbe8242bd..179375b2d862 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -203,11 +203,16 @@ | |||
203 | 203 | ||
204 | #ifdef CONFIG_STACK_VALIDATION | 204 | #ifdef CONFIG_STACK_VALIDATION |
205 | #define annotate_unreachable() ({ \ | 205 | #define annotate_unreachable() ({ \ |
206 | asm("%c0:\t\n" \ | 206 | asm("%c0:\n\t" \ |
207 | ".pushsection .discard.unreachable\t\n" \ | 207 | ".pushsection .discard.unreachable\n\t" \ |
208 | ".long %c0b - .\t\n" \ | 208 | ".long %c0b - .\n\t" \ |
209 | ".popsection\t\n" : : "i" (__LINE__)); \ | 209 | ".popsection\n\t" : : "i" (__LINE__)); \ |
210 | }) | 210 | }) |
211 | #define ASM_UNREACHABLE \ | ||
212 | "999:\n\t" \ | ||
213 | ".pushsection .discard.unreachable\n\t" \ | ||
214 | ".long 999b - .\n\t" \ | ||
215 | ".popsection\n\t" | ||
211 | #else | 216 | #else |
212 | #define annotate_unreachable() | 217 | #define annotate_unreachable() |
213 | #endif | 218 | #endif |