Use elf_relocaddr() to find the address for R_RISCV_RELATIVE
relocation. elf_relocaddr() has a hook to handle VIMAGE data addresses. This fixes VIMAGE support for RISC-V when built as a module. Approved by: re (gjb) Sponsored by: DARPA, AFRL
This commit is contained in:
parent
86c5937532
commit
752a8ea48e
@ -330,11 +330,9 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data,
|
||||
break;
|
||||
|
||||
case R_RISCV_RELATIVE:
|
||||
val = relocbase + addend;
|
||||
|
||||
before64 = *where;
|
||||
if (*where != val)
|
||||
*where = val;
|
||||
|
||||
*where = elf_relocaddr(lf, relocbase + addend);
|
||||
|
||||
if (debug_kld)
|
||||
printf("%p %c %-24s %016lx -> %016lx\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user