summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-01-16 23:50:49 +0000
committerJim Grosbach <grosbach@apple.com>2012-01-16 23:50:49 +0000
commit9df6cc8f4f9005012ead32fa0be0e8a9c8089508 (patch)
treee91e95b4b159b5f12978bd0991d7cd520be3b2f7
parent486df738c305eeb148d557a94777f2c04aa72d40 (diff)
downloadbcm5719-llvm-9df6cc8f4f9005012ead32fa0be0e8a9c8089508.tar.gz
bcm5719-llvm-9df6cc8f4f9005012ead32fa0be0e8a9c8089508.zip
MCJIT handle a few more simple x86 relocations for MachO.
llvm-svn: 148263
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index 81b2d17f885..a3b4919f68b 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -50,8 +50,13 @@ resolveX86_64Relocation(uintptr_t Address, uintptr_t Value, bool isPCRel,
switch(Type) {
default:
llvm_unreachable("Invalid relocation type!");
+ case macho::RIT_X86_64_Signed1:
+ case macho::RIT_X86_64_Signed2:
+ case macho::RIT_X86_64_Signed4:
+ case macho::RIT_X86_64_Signed:
case macho::RIT_X86_64_Unsigned:
case macho::RIT_X86_64_Branch: {
+ Value += Addend;
// Mask in the target value a byte at a time (we don't have an alignment
// guarantee for the target address, so this is safest).
uint8_t *p = (uint8_t*)Address;
@@ -61,13 +66,9 @@ resolveX86_64Relocation(uintptr_t Address, uintptr_t Value, bool isPCRel,
}
return false;
}
- case macho::RIT_X86_64_Signed:
case macho::RIT_X86_64_GOTLoad:
case macho::RIT_X86_64_GOT:
case macho::RIT_X86_64_Subtractor:
- case macho::RIT_X86_64_Signed1:
- case macho::RIT_X86_64_Signed2:
- case macho::RIT_X86_64_Signed4:
case macho::RIT_X86_64_TLV:
return Error("Relocation type not implemented yet!");
}
OpenPOWER on IntegriCloud