public inbox for live-patching@vger.kernel.org
 help / color / mirror / Atom feed
From: Song Liu <song@kernel.org>
To: live-patching@vger.kernel.org
Cc: jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz,
	pmladek@suse.com, joe.lawrence@redhat.com, kernel-team@meta.com,
	Song Liu <song@kernel.org>
Subject: [PATCH v4 0/7] objtool/klp: klp-build LTO support
Date: Thu,  5 Mar 2026 15:15:24 -0800	[thread overview]
Message-ID: <20260305231531.3847295-1-song@kernel.org> (raw)

Add support for LTO in klp-build toolchain. The key changes are to the
symbol correlation logic.Basically, we want to:

1. Match symbols with differerent .llvm.<hash> suffixes, e.g., foo.llvm.123
   to foo.llvm.456.
2. Match local symbols with promoted global symbols, e.g., local foo
   with global foo.llvm.123.

1/7 and 2/7 are small cleanup/fix for existing code.
3/7 through 7/7 contains the core logic changes to correlate_symbols().

Changes v3 => v4:
1. Minor fixes in patches 1, 3, 7.
2. Only keep patches 1-7 for now, as there is ongoing discussion about the
   test infrastructure.

Changes v2 => v3:
1. Fix a bug in global => local correlations (patch 7/8).
2. Remove a WARN().
3. Some empty line changes.

Changes v1 => v2:
1. Error out on ambiguous .llvm.<hash>

Song Liu (7):
  objtool/klp: Remove redundant strcmp() in correlate_symbols()
  objtool/klp: Remove trailing '_' in demangle_name()
  objtool/klp: Use sym->demangled_name for symbol_name hash
  objtool/klp: Also demangle global objects
  objtool/klp: Remove .llvm suffix in demangle_name()
  objtool/klp: Match symbols based on demangled_name for global
    variables
  objtool/klp: Correlate locals to globals

 tools/objtool/elf.c                 | 95 ++++++++++++++++++++++-------
 tools/objtool/include/objtool/elf.h |  3 +
 tools/objtool/klp-diff.c            | 89 ++++++++++++++++++++++++++-
 3 files changed, 165 insertions(+), 22 deletions(-)

--
2.52.0

             reply	other threads:[~2026-03-05 23:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-05 23:15 Song Liu [this message]
2026-03-05 23:15 ` [PATCH v4 1/7] objtool/klp: Remove redundant strcmp() in correlate_symbols() Song Liu
2026-03-05 23:15 ` [PATCH v4 2/7] objtool/klp: Remove trailing '_' in demangle_name() Song Liu
2026-03-05 23:15 ` [PATCH v4 3/7] objtool/klp: Use sym->demangled_name for symbol_name hash Song Liu
2026-03-05 23:15 ` [PATCH v4 4/7] objtool/klp: Also demangle global objects Song Liu
2026-03-05 23:15 ` [PATCH v4 5/7] objtool/klp: Remove .llvm suffix in demangle_name() Song Liu
2026-03-05 23:15 ` [PATCH v4 6/7] objtool/klp: Match symbols based on demangled_name for global variables Song Liu
2026-03-05 23:15 ` [PATCH v4 7/7] objtool/klp: Correlate locals to globals Song Liu
2026-03-06 16:09 ` [PATCH v4 0/7] objtool/klp: klp-build LTO support Josh Poimboeuf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260305231531.3847295-1-song@kernel.org \
    --to=song@kernel.org \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=pmladek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox