]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
objtool/klp: Simplify reloc symbol conversion
authorJosh Poimboeuf <jpoimboe@kernel.org>
Thu, 30 Apr 2026 03:07:28 +0000 (20:07 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 5 May 2026 04:16:01 +0000 (21:16 -0700)
commit8fdc3585b3b09f2c55d8573edc6a1dbfeb728f03
tree9fb147bbf5102796f9d6821123c4db4f31e33465
parent3e01ab44af207a2d8c197653e7278083b039a274
objtool/klp: Simplify reloc symbol conversion

Inline section_reference_needed() and is_reloc_allowed() into
convert_reloc_sym() and remove the redundant is_reloc_allowed() check in
clone_reloc().

Move the is_sec_sym() checks into the convert callees so they become
no-ops when the reloc is already in the right format.  This allows
convert_reloc_sym() to unconditionally dispatch to the right converter
based on section type.

Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
tools/objtool/klp-diff.c