diff options
author | Julien Thierry <jthierry@redhat.com> | 2020-09-04 18:30:26 +0300 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@redhat.com> | 2020-09-10 18:43:13 +0300 |
commit | 5567c6c39f3404e4492c18c0c1abff5556684f6e (patch) | |
tree | e068022415fc085c99b81554c7131824998c0b63 | |
parent | 00089c048eb4a8250325efb32a2724fd0da68cce (diff) | |
download | linux-5567c6c39f3404e4492c18c0c1abff5556684f6e.tar.xz |
objtool: Only include valid definitions depending on source file type
Header include/linux/objtool.h contains both C and assembly definition that
are visible regardless of the file including them.
Place definition under conditional __ASSEMBLY__.
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
-rw-r--r-- | include/linux/objtool.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/objtool.h b/include/linux/objtool.h index 358175c9c2b5..15e9997a9fb4 100644 --- a/include/linux/objtool.h +++ b/include/linux/objtool.h @@ -3,6 +3,8 @@ #define _LINUX_OBJTOOL_H #ifdef CONFIG_STACK_VALIDATION + +#ifndef __ASSEMBLY__ /* * This macro marks the given function's stack frame as "non-standard", which * tells objtool to ignore the function when doing stack metadata validation. @@ -15,6 +17,8 @@ static void __used __section(.discard.func_stack_frame_non_standard) \ *__func_stack_frame_non_standard_##func = func +#else /* __ASSEMBLY__ */ + /* * This macro indicates that the following intra-function call is valid. * Any non-annotated intra-function call will cause objtool to issue a warning. @@ -25,6 +29,8 @@ .long 999b; \ .popsection; +#endif /* __ASSEMBLY__ */ + #else /* !CONFIG_STACK_VALIDATION */ #define STACK_FRAME_NON_STANDARD(func) |