]> git.baikalelectronics.ru Git - kernel.git/commitdiff
objtool: Don't autodetect vmlinux.o
authorSami Tolvanen <samitolvanen@google.com>
Fri, 17 Jul 2020 19:04:27 +0000 (12:04 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 23 Feb 2021 20:46:57 +0000 (12:46 -0800)
With LTO, we run objtool on vmlinux.o, but don't want noinstr
validation. This change requires --vmlinux to be passed to objtool
explicitly.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
scripts/link-vmlinux.sh
tools/objtool/builtin-check.c

index c5919d5a0b4f2b7286449d82a04d64448b59f75f..423a4106f0dd1f709c40a37d91cdd04b12dbd221 100755 (executable)
@@ -106,7 +106,7 @@ objtool_link()
        local objtoolopt;
 
        if [ -n "${CONFIG_VMLINUX_VALIDATION}" ]; then
-               objtoolopt="check"
+               objtoolopt="check --vmlinux"
                if [ -z "${CONFIG_FRAME_POINTER}" ]; then
                        objtoolopt="${objtoolopt} --no-fp"
                fi
index e92e76f691769814b7022561145598753a8f0a68..facfc10bc5dc3d4ffc7cc3f2a250ed31c7ddf09e 100644 (file)
@@ -41,7 +41,7 @@ const struct option check_options[] = {
 
 int cmd_check(int argc, const char **argv)
 {
-       const char *objname, *s;
+       const char *objname;
        struct objtool_file *file;
        int ret;
 
@@ -52,10 +52,6 @@ int cmd_check(int argc, const char **argv)
 
        objname = argv[0];
 
-       s = strstr(objname, "vmlinux.o");
-       if (s && !s[9])
-               vmlinux = true;
-
        file = objtool_open_read(objname);
        if (!file)
                return 1;