linux/tools/objtool
Josh Poimboeuf 4cdee7888f objtool: Fix "unexpected end of section" warning for alternatives
Due to the short circuiting logic in next_insn_to_validate(), control
flow may silently transition from .altinstr_replacement to .text without
a corresponding nested call to validate_branch().

As a result the validate_branch() 'sec' variable doesn't get
reinitialized, which can trigger a confusing "unexpected end of section"
warning which blames .altinstr_replacement rather than the offending
fallthrough function.

Fix that by not caching the section.  There's no point in doing that
anyway.

Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
2025-10-14 14:45:24 -07:00
..
arch objtool: Fix __pa_symbol() relocation handling 2025-10-14 14:45:24 -07:00
Documentation objtool: Fix up some outdated references to ENTRY/ENDPROC 2025-03-25 09:20:27 +01:00
include/objtool objtool: Fix x86 addend calculation 2025-10-14 14:45:24 -07:00
.gitignore objtool: Install libsubcmd in build 2023-01-30 16:27:46 -08:00
Build objtool: Install libsubcmd in build 2023-01-30 16:27:46 -08:00
builtin-check.c objtool: Remove unneeded semicolon 2025-10-14 14:45:20 -07:00
check.c objtool: Fix "unexpected end of section" warning for alternatives 2025-10-14 14:45:24 -07:00
elf.c objtool: Fix weak symbol detection 2025-10-14 14:45:23 -07:00
Makefile objtool: Hide unnecessary compiler error message 2025-03-12 15:43:38 -07:00
noreturns.h x86/sev: Zap snp_abort() 2025-09-04 13:15:59 +02:00
objtool.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
orc_dump.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
orc_gen.c objtool/x86: Separate arch-specific and generic parts 2024-03-11 22:23:47 +08:00
special.c objtool: Remove error handling boilerplate 2025-10-14 14:45:23 -07:00
sync-check.sh interval_tree: Sync interval_tree_generic.h with tools 2025-10-14 14:45:22 -07:00
weak.c objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00