summaryrefslogtreecommitdiff
path: root/tools/objtool/Build
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2025-09-17 19:04:01 +0300
committerJosh Poimboeuf <jpoimboe@kernel.org>2025-10-15 00:50:18 +0300
commitebe864b55304f74c4e1a8b6c899e34446b2be424 (patch)
tree887efac075ae2801857bfa3e34fc336b2d4bf2cc /tools/objtool/Build
parent7c2575a6406fb85946b05d8dcc856686d3156354 (diff)
downloadlinux-ebe864b55304f74c4e1a8b6c899e34446b2be424.tar.xz
objtool/klp: Add post-link subcommand to finalize livepatch modules
Livepatch needs some ELF magic which linkers don't like: - Two relocation sections (.rela*, .klp.rela*) for the same text section. - Use of SHN_LIVEPATCH to mark livepatch symbols. Unfortunately linkers tend to mangle such things. To work around that, klp diff generates a linker-compliant intermediate binary which encodes the relevant KLP section/reloc/symbol metadata. After module linking, the .ko then needs to be converted to an actual livepatch module. Introduce a new klp post-link subcommand to do so. Acked-by: Petr Mladek <pmladek@suse.com> Tested-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/Build')
-rw-r--r--tools/objtool/Build2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/Build b/tools/objtool/Build
index 0b01657671d7..8cd71b9a5eef 100644
--- a/tools/objtool/Build
+++ b/tools/objtool/Build
@@ -9,7 +9,7 @@ objtool-y += elf.o
objtool-y += objtool.o
objtool-$(BUILD_ORC) += orc_gen.o orc_dump.o
-objtool-$(BUILD_KLP) += builtin-klp.o klp-diff.o
+objtool-$(BUILD_KLP) += builtin-klp.o klp-diff.o klp-post-link.o
objtool-y += libstring.o
objtool-y += libctype.o