From: Josh Poimboeuf Date: Mon, 24 Mar 2025 21:56:03 +0000 (-0700) Subject: objtool: Remove redundant opts.noinstr dependency X-Git-Tag: v6.15-rc1~60^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8d39a62c6f5ad76b8a1ebfbf10dd9fe8ca2bbcc;p=thirdparty%2Flinux.git objtool: Remove redundant opts.noinstr dependency The --noinstr dependecy on --link is already enforced in the cmdline arg parsing code. Remove the redundant check. Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/0ead7ffa0f5be2e81aebbcc585e07b2c98702b44.1742852847.git.jpoimboe@kernel.org --- diff --git a/tools/objtool/check.c b/tools/objtool/check.c index ac21f2846ebc0..0caabf0e8faf2 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -340,12 +340,7 @@ static void init_insn_state(struct objtool_file *file, struct insn_state *state, memset(state, 0, sizeof(*state)); init_cfi_state(&state->cfi); - /* - * We need the full vmlinux for noinstr validation, otherwise we can - * not correctly determine insn_call_dest(insn)->sec (external symbols - * do not have a section). - */ - if (opts.link && opts.noinstr && sec) + if (opts.noinstr && sec) state->noinstr = sec->noinstr; }