public inbox for live-patching@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/7] objtool/klp: klp-build LTO support
@ 2026-03-05 23:15 Song Liu
  2026-03-05 23:15 ` [PATCH v4 1/7] objtool/klp: Remove redundant strcmp() in correlate_symbols() Song Liu
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Song Liu @ 2026-03-05 23:15 UTC (permalink / raw)
  To: live-patching
  Cc: jpoimboe, jikos, mbenes, pmladek, joe.lawrence, kernel-team,
	Song Liu

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-06 16:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 23:15 [PATCH v4 0/7] objtool/klp: klp-build LTO support Song Liu
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox