diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2013-05-06 17:21:23 +0000 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2013-05-06 17:21:23 +0000 |
commit | e8bd03da5c438eaf8f364b265043383a95f68674 (patch) | |
tree | e706d14c00801d31e9f46cd4de724127b4c1266f /llvm/lib/ExecutionEngine | |
parent | 4189ef456a1c9e534e08d6b844123549d15c9783 (diff) | |
download | bcm5719-llvm-e8bd03da5c438eaf8f364b265043383a95f68674.tar.gz bcm5719-llvm-e8bd03da5c438eaf8f364b265043383a95f68674.zip |
PowerPC: Fix unimplemented relocation on ppc64
This patch handles the R_PPC64_REL64 relocation type for powerpc64
for mcjit.
llvm-svn: 181220
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-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 004f4f29967..d4d84d31d06 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -628,6 +628,11 @@ void RuntimeDyldELF::resolvePPC64Relocation(const SectionEntry &Section, llvm_unreachable("Relocation R_PPC64_REL32 overflow"); writeInt32BE(LocalAddress, delta); } break; + case ELF::R_PPC64_REL64: { + uint64_t FinalAddress = (Section.LoadAddress + Offset); + uint64_t Delta = Value - FinalAddress + Addend; + writeInt64BE(LocalAddress, Delta); + } break; case ELF::R_PPC64_ADDR64 : writeInt64BE(LocalAddress, Value + Addend); break; |