mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
AArch64: implement 64-bit absolute relocation in MCJIT
This is about the simplest relocation, but surprisingly rare in actual code. It occurs in (for example) the MCJIT test test-ptr-reloc.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181134 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4a9b6b798d
commit
d52eaae157
@ -289,6 +289,11 @@ void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section,
|
||||
default:
|
||||
llvm_unreachable("Relocation type not implemented yet!");
|
||||
break;
|
||||
case ELF::R_AARCH64_ABS64: {
|
||||
uint64_t *TargetPtr = reinterpret_cast<uint64_t*>(Section.Address + Offset);
|
||||
*TargetPtr = Value + Addend;
|
||||
break;
|
||||
}
|
||||
case ELF::R_AARCH64_PREL32: { // test-shift.ll (.eh_frame)
|
||||
uint64_t Result = Value + Addend - FinalAddress;
|
||||
assert(static_cast<int64_t>(Result) >= INT32_MIN &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user