1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

PowerPC: Fix unimplemented relocation on ppc64

This patch handles the R_PPC64_REL64 relocation type for powerpc64
for mcjit.

llvm-svn: 181220
This commit is contained in:
Adhemerval Zanella 2013-05-06 17:21:23 +00:00
parent 8911ab2fa9
commit 3b2874423e
2 changed files with 6 additions and 1 deletions

View File

@ -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;

View File

@ -1,5 +1,5 @@
; RUN: %lli_mcjit %s
; XFAIL: powerpc64, arm, cygwin
; XFAIL: arm, cygwin
declare i8* @__cxa_allocate_exception(i64)
declare void @__cxa_throw(i8*, i8*, i8*)
declare i32 @__gxx_personality_v0(...)