mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
objtool/klp: Fix relocation conversion failures for R_X86_64_NONE
Objtool has some hacks which NOP out certain calls/jumps and replace
their relocations with R_X86_64_NONE. The klp-diff relocation
extraction code will error out when trying to copy these relocations due
to their negative addend, which would only makes sense for a PC-relative
branch instruction. Just ignore them.
Fixes: dd590d4d57 ("objtool/klp: Introduce klp diff subcommand for diffing object files")
Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
This commit is contained in:
@@ -1033,6 +1033,9 @@ found_sym:
|
||||
*/
|
||||
static int convert_reloc_sym(struct elf *elf, struct reloc *reloc)
|
||||
{
|
||||
if (reloc_type(reloc) == R_NONE)
|
||||
return 1;
|
||||
|
||||
if (is_reloc_allowed(reloc))
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user