On Wed, Aug 5, 2026 at 7:30 AM Josh Poimboeuf <[email protected]> wrote:
>
> A klp relocation section is .klp.rela.<objname>.<secname>, where objname
> is the object being patched.
>
> klp-build wrongly derives objname from where the referenced symbol
> lives, not where it's referenced.  For a cross-module reference like
> patched can_isotp code calling can.ko's can_rx_unregister(), that gives
> .klp.rela.can..text rather than .klp.rela.can_isotp..text.  Unless the
> patch happens to patch can.ko as well, the relocation never gets applied
> and the call goes off into the weeds.
>
> Name the intermediate section __klp_relocs.<objname> so post-link can
> read the patched object's name from there.
>
> Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing 
> object files")
> Reported-by: Joe Lawrence <[email protected]>
> Link: https://lore.kernel.org/[email protected]
> Signed-off-by: Josh Poimboeuf <[email protected]>

Acked-by: Song Liu <[email protected]>

Reply via email to