kmod/core: add support for R_X86_64_64 dynrelas

Needed for relocations to data sections.
This commit is contained in:
Josh Poimboeuf 2014-06-04 11:38:30 -05:00
parent f6c8745a42
commit 76157dce4a
1 changed files with 8 additions and 4 deletions

View File

@ -538,11 +538,15 @@ static int kpatch_write_relocations(struct kpatch_module *kpmod)
val = (s32)src_addr + dynrela->addend;
size = 4;
break;
case R_X86_64_64:
loc = dynrela->dest;
val = dynrela->src;
size = 8;
break;
default:
printk("unsupported rela type %ld for "
"0x%lx <- 0x%lx at index %d\n",
dynrela->type, dynrela->dest,
src_addr, i);
printk("unsupported rela type %ld for source %s (0x%lx <- 0x%lx) at index %d\n",
dynrela->type, dynrela->name,
dynrela->dest, src_addr, i);
return -EINVAL;
}