]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
objtool: Add elf_create_reloc() and elf_init_reloc()
authorJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 17 Sep 2025 16:03:50 +0000 (09:03 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 14 Oct 2025 21:46:49 +0000 (14:46 -0700)
commit2c05ca02621837af7cd8fab6ae7421b9cd5dff6e
tree3569e3569a7e60e41fe12b56fb213c8959bb6b2d
parent431dbabf2d9dd27cd597a9d1d4611e7ae64bf8bd
objtool: Add elf_create_reloc() and elf_init_reloc()

elf_create_rela_section() is quite limited in that it requires the
caller to know how many relocations need to be allocated up front.

In preparation for the objtool klp diff subcommand, allow an arbitrary
number of relocations to be created and initialized on demand after
section creation.

Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
tools/objtool/elf.c
tools/objtool/include/objtool/elf.h