]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
objtool: Fix standalone --hacks=jump_label
authorDylan Hatch <dylanbhatch@google.com>
Tue, 23 Sep 2025 00:49:41 +0000 (00:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:54:41 +0000 (13:54 +0100)
commit5be8a348528b7ed061c1255e553cb1275735659d
tree63f2ce02da7e524b0a9f6882ee90ded3433d2913
parentf0581990dbf3a72692bd629b3531a619f28e50ab
objtool: Fix standalone --hacks=jump_label

[ Upstream commit be8374a5ba7cbab6b97df94b4ffe0b92f5c8a6d2 ]

The objtool command line 'objtool --hacks=jump_label foo.o' on its own
should be expected to rewrite jump labels to NOPs. This means the
add_special_section_alts() code path needs to run when only this option
is provided.

This is mainly relevant in certain debugging situations, but could
potentially also fix kernel builds in which objtool is run with
--hacks=jump_label but without --orc, --stackval, --uaccess, or
--hacks=noinstr.

Fixes: de6fbcedf5ab ("objtool: Read special sections with alts only when specific options are selected")
Signed-off-by: Dylan Hatch <dylanbhatch@google.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/objtool/check.c