On Wed, Apr 22, 2026 at 9:04 PM Josh Poimboeuf <[email protected]> wrote: > > 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") > Signed-off-by: Josh Poimboeuf <[email protected]>
Acked-by: Song Liu <[email protected]>

