mirror of https://github.com/dynup/kpatch
kmod/core: add support for R_X86_64_64 dynrelas
Needed for relocations to data sections.
This commit is contained in:
parent
f6c8745a42
commit
76157dce4a
|
@ -538,11 +538,15 @@ static int kpatch_write_relocations(struct kpatch_module *kpmod)
|
||||||
val = (s32)src_addr + dynrela->addend;
|
val = (s32)src_addr + dynrela->addend;
|
||||||
size = 4;
|
size = 4;
|
||||||
break;
|
break;
|
||||||
|
case R_X86_64_64:
|
||||||
|
loc = dynrela->dest;
|
||||||
|
val = dynrela->src;
|
||||||
|
size = 8;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
printk("unsupported rela type %ld for "
|
printk("unsupported rela type %ld for source %s (0x%lx <- 0x%lx) at index %d\n",
|
||||||
"0x%lx <- 0x%lx at index %d\n",
|
dynrela->type, dynrela->name,
|
||||||
dynrela->type, dynrela->dest,
|
dynrela->dest, src_addr, i);
|
||||||
src_addr, i);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue