Skip to content

objtool/klp: klp-build LTO support

Song Liu live-patching lkml 4 versions – Applied

Status from this message: The following commit has been merged into the objtool/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 1 replyApplied
  2. v38 patches 17 repliesSuperseded
  3. v28 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches5 repliesSuperseded

Changes in v4 from the cover letter

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.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/7objtool/klp: Remove redundant strcmp() in correlate_symbols()tools/objtool/klp-diff.c+1 -10 replies
2/7objtool/klp: Remove trailing '_' in demangle_name()tools/objtool/elf.c+14 -10 replies
3/7objtool/klp: Use sym->demangled_name for symbol_name hashtools/objtool/elf.c+40 -180 replies
4/7objtool/klp: Also demangle global objectstools/objtool/elf.c+0 -30 replies
5/7objtool/klp: Remove .llvm suffix in demangle_name()tools/objtool/elf.c+8 -00 replies
6/7objtool/klp: Match symbols based on demangled_name for global variablestools/objtool/elf.c tools/objtool/include/objtool/elf.h tools/objtool/klp-diff.c+73 -00 replies
7/7objtool/klp: Correlate locals to globalstools/objtool/klp-diff.c+30 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/7] objtool/klp: klp-build LTO support

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