diff options
author | Tim Northover <Tim.Northover@arm.com> | 2013-05-04 20:14:14 +0000 |
---|---|---|
committer | Tim Northover <Tim.Northover@arm.com> | 2013-05-04 20:14:14 +0000 |
commit | b23d8dbbaced12d6b4344aaf3efd8b6e1d2fd7f2 (patch) | |
tree | bee44ebe05417eca08f22b90f39caed85066b159 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | |
parent | 37cde9755d958f515ea09e4d237a943935128814 (diff) | |
download | bcm5719-llvm-b23d8dbbaced12d6b4344aaf3efd8b6e1d2fd7f2.tar.gz bcm5719-llvm-b23d8dbbaced12d6b4344aaf3efd8b6e1d2fd7f2.zip |
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.
llvm-svn: 181134
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 487e503e91e..80231a7c040 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -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 && |