[Devel] [PATCH hci-8.2 2/6] ms/objtool/klp: Fix extraction of text annotations for alternatives

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Dec 1 03:41:42 MSK 2026


> From: Josh Poimboeuf <jpoimboe at kernel.org>
> 
> Objtool is failing to extract text annotations which reference
> .altinstr_replacement instructions:
> 
>   1) Alternative replacement fake symbols are NOTYPE rather than FUNC,
>      and they don't have sym->included set, thus they aren't recognized
>      by should_keep_special_sym().
> 
>   2) .discard.annotate_insn gets processed before .altinstr_replacement,
>      so the referenced (fake) symbols don't have clones yet.
> 
> Fix the first issue by checking for a valid clone instead of
> sym->included and by accepting NOTYPE symbols when processing
> .discard.annotate_insn.
> 
> Fix the second issue by deferring text annotation processing until after
> the other special sections have been cloned.
> 
> Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
> Acked-by: Song Liu <song at kernel.org>
> Reviewed-by: Miroslav Benes <mbenes at suse.cz>
> Signed-off-by: Josh Poimboeuf <jpoimboe at kernel.org>
> (cherry picked from commit 62a7a01fde87c99926cd7e9670b4226c4c79ebaf)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-157128
> Feature: klp-build support
> Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157128-more-klp-build-fixes-v1-0-69a0363954e4@virtuozzo.com?part=2




More information about the Devel mailing list