diff options
author | Lang Hames <lhames@gmail.com> | 2013-08-09 00:57:01 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2013-08-09 00:57:01 +0000 |
commit | fe2833be4d17548d136b547035b38bd3737f7cef (patch) | |
tree | 1f9c5ec3b6062ec9ceb727425b05cfab45078cc2 /llvm/lib/ExecutionEngine | |
parent | 867b185e63be46d186362774d8c97758c8942aca (diff) | |
download | bcm5719-llvm-fe2833be4d17548d136b547035b38bd3737f7cef.tar.gz bcm5719-llvm-fe2833be4d17548d136b547035b38bd3737f7cef.zip |
Optimistically ignore scattered relocations in MachO in RuntimeDyld. This
un-breaks simple use cases while I work on more general support.
<rdar://problem/14487667>
llvm-svn: 188044
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index 0384b322624..5d5ff3a2c41 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp @@ -287,6 +287,16 @@ void RuntimeDyldMachO::processRelocationRef(unsigned SectionID, macho::RelocationEntry RE = MachO->getRelocation(RelI.getRawDataRefImpl()); uint32_t RelType = MachO->getAnyRelocationType(RE); + + // FIXME: Properly handle scattered relocations. + // For now, optimistically skip these: they can often be ignored, as + // the static linker will already have applied the relocation, and it + // only needs to be reapplied if symbols move relative to one another. + // Note: This will fail horribly where the relocations *do* need to be + // applied, but that was already the case. + if (MachO->isRelocationScattered(RE)) + return; + RelocationValueRef Value; SectionEntry &Section = Sections[SectionID]; |