mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
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>
This commit is contained in:
parent
00089c048e
commit
5567c6c39f
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue