objtool: Split noinstr validation from --vmlinux

This change adds a --noinstr flag to objtool to allow us to specify
that we're processing vmlinux.o without also enabling noinstr
validation. This is needed to avoid false positives with LTO when we
run objtool on vmlinux.o without CONFIG_DEBUG_ENTRY.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
Sami Tolvanen 2020-09-30 14:36:59 -07:00 committed by Kees Cook
parent 6dafca9780
commit 41425ebe20
4 changed files with 5 additions and 4 deletions

View file

@ -106,7 +106,7 @@ objtool_link()
local objtoolopt;
if [ -n "${CONFIG_VMLINUX_VALIDATION}" ]; then
objtoolopt="check --vmlinux"
objtoolopt="check --vmlinux --noinstr"
if [ -z "${CONFIG_FRAME_POINTER}" ]; then
objtoolopt="${objtoolopt} --no-fp"
fi