objtool: Make static call annotation optional

As part of making objtool more modular, put the existing static call
code behind a new '--static-call' option.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Link: https://lkml.kernel.org/r/d59ac57ef3d6d8380cdce20322314c9e2e556750.1650300597.git.jpoimboe@redhat.com
This commit is contained in:
Josh Poimboeuf
2022-04-18 09:50:38 -07:00
committed by Peter Zijlstra
parent 7206447496
commit 26e176896a
5 changed files with 14 additions and 5 deletions

View File

@@ -141,11 +141,14 @@ objtool_link()
objtoolopt="${objtoolopt} --stackval"
fi
if is_enabled CONFIG_HAVE_STATIC_CALL_INLINE; then
objtoolopt="${objtoolopt} --static-call"
fi
if is_enabled CONFIG_X86_SMAP; then
objtoolopt="${objtoolopt} --uaccess"
fi
objtoolopt="${objtoolopt} --lto"
fi