diff --git a/libhijacker/source/elf/elf.cpp b/libhijacker/source/elf/elf.cpp index 06f7b6d..a2a83cc 100644 --- a/libhijacker/source/elf/elf.cpp +++ b/libhijacker/source/elf/elf.cpp @@ -787,7 +787,7 @@ bool Elf::processRelocations() noexcept { if (libsym == 0) [[unlikely]] { return false; } - *faddr(rel->r_offset) = libsym + toFileOffset(rel->r_addend); + *faddr(rel->r_offset) = libsym + rel->r_addend; break; } case R_X86_64_GLOB_DAT: { @@ -804,7 +804,7 @@ bool Elf::processRelocations() noexcept { } case R_X86_64_RELATIVE: { // imagebase + addend - *faddr(rel->r_offset) = imagebase + toFileOffset(rel->r_addend); + *faddr(rel->r_offset) = toVirtualAddress(rel->r_addend); break; } case R_X86_64_JMP_SLOT: {