diff options
| author | Josh Poimboeuf <jpoimboe@kernel.org> | 2025-09-17 09:04:01 -0700 |
|---|---|---|
| committer | Josh Poimboeuf <jpoimboe@kernel.org> | 2025-10-14 14:50:18 -0700 |
| commit | ebe864b55304f74c4e1a8b6c899e34446b2be424 (patch) | |
| tree | 887efac075ae2801857bfa3e34fc336b2d4bf2cc /scripts/livepatch/init.c | |
| parent | 7c2575a6406fb85946b05d8dcc856686d3156354 (diff) | |
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 'scripts/livepatch/init.c')
0 files changed, 0 insertions, 0 deletions
