* [PATCH] objtool: Let --hacks=jump_label read special sections with alts.
@ 2025-09-23 0:49 Dylan Hatch
2025-10-01 23:29 ` Josh Poimboeuf
0 siblings, 1 reply; 2+ messages in thread
From: Dylan Hatch @ 2025-09-23 0:49 UTC (permalink / raw)
To: Josh Poimboeuf, Peter Zijlstra
Cc: Dylan Hatch, Roman Gushchin, Weinan Liu, Naveen N Rao,
Christophe Leroy, Sathvika Vasireddy, Michael Ellerman,
linux-kernel
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>
---
tools/objtool/check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index d14f20ef1db1..1b4b4bd7dc90 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2562,7 +2562,7 @@ static int decode_sections(struct objtool_file *file)
* Must be before add_jump_destinations(), which depends on 'func'
* being set for alternatives, to enable proper sibling call detection.
*/
- if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr) {
+ if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr || opts.hack_jump_label) {
ret = add_special_section_alts(file);
if (ret)
return ret;
--
2.51.0.534.gc79095c0ca-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] objtool: Let --hacks=jump_label read special sections with alts.
2025-09-23 0:49 [PATCH] objtool: Let --hacks=jump_label read special sections with alts Dylan Hatch
@ 2025-10-01 23:29 ` Josh Poimboeuf
0 siblings, 0 replies; 2+ messages in thread
From: Josh Poimboeuf @ 2025-10-01 23:29 UTC (permalink / raw)
To: Dylan Hatch
Cc: Peter Zijlstra, Roman Gushchin, Weinan Liu, Naveen N Rao,
Christophe Leroy, Sathvika Vasireddy, Michael Ellerman,
linux-kernel
On Tue, Sep 23, 2025 at 12:49:41AM +0000, Dylan Hatch wrote:
> 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>
Queued, thanks!
--
Josh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-01 23:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 0:49 [PATCH] objtool: Let --hacks=jump_label read special sections with alts Dylan Hatch
2025-10-01 23:29 ` Josh Poimboeuf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.