mirror of https://github.com/dynup/kpatch
create-diff-object: support R_X86_64_NONE in kpatch_replace_sections_syms()
Add support for R_X86_64_NONE. With an upstream kernel, it's quite rare, only used for a few jump labels. With older kernels it was used for fentry hooks. Either way, it should be treated like a PC-relative relocation. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This commit is contained in:
parent
79f45d1b0a
commit
3f8e1062cc
|
@ -1580,7 +1580,8 @@ static void kpatch_replace_sections_syms(struct kpatch_elf *kelf)
|
|||
rela->type == R_X86_64_32S)
|
||||
add_off = 0;
|
||||
else if (rela->type == R_X86_64_PC32 ||
|
||||
rela->type == R_X86_64_PLT32) {
|
||||
rela->type == R_X86_64_PLT32 ||
|
||||
rela->type == R_X86_64_NONE) {
|
||||
struct insn insn;
|
||||
rela_insn(relasec, rela, &insn);
|
||||
add_off = (unsigned int)((long)insn.next_byte -
|
||||
|
|
Loading…
Reference in New Issue