aboutsummaryrefslogtreecommitdiffstats
path: root/tools/objtool/builtin-check.c
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2020-09-30 14:36:59 -0700
committerKees Cook <keescook@chromium.org>2021-02-23 12:46:57 -0800
commit41425ebe20245c99b44d6ba0f017be9bfc28414f (patch)
tree41ab9f3adf71fb17c56e6975214088e4631bafde /tools/objtool/builtin-check.c
parentx86, build: use objtool mcount (diff)
downloadlinux-dev-41425ebe20245c99b44d6ba0f017be9bfc28414f.tar.xz
linux-dev-41425ebe20245c99b44d6ba0f017be9bfc28414f.zip
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>
Diffstat (limited to 'tools/objtool/builtin-check.c')
-rw-r--r--tools/objtool/builtin-check.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index facfc10bc5dc..b84cdc72b51f 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -18,7 +18,7 @@
#include "builtin.h"
#include "objtool.h"
-bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, mcount;
+bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, mcount, noinstr;
static const char * const check_usage[] = {
"objtool check [<options>] file.o",
@@ -34,6 +34,7 @@ const struct option check_options[] = {
OPT_BOOLEAN('a', "uaccess", &uaccess, "enable uaccess checking"),
OPT_BOOLEAN('s', "stats", &stats, "print statistics"),
OPT_BOOLEAN('d', "duplicate", &validate_dup, "duplicate validation for vmlinux.o"),
+ OPT_BOOLEAN('n', "noinstr", &noinstr, "noinstr validation for vmlinux.o"),
OPT_BOOLEAN('l', "vmlinux", &vmlinux, "vmlinux.o validation"),
OPT_BOOLEAN('M', "mcount", &mcount, "generate __mcount_loc"),
OPT_END(),