Commit 0e731dbc authored by Sami Tolvanen's avatar Sami Tolvanen Committed by Kees Cook
Browse files

objtool: Don't autodetect vmlinux.o



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: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
parent 18a14575
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −5
Original line number Diff line number Diff line
@@ -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;