mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Optimistically ignore scattered relocations in MachO in RuntimeDyld. This
un-breaks simple use cases while I work on more general support. <rdar://problem/14487667> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188044 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
128ce319ec
commit
623f2025a7
@ -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];
|
||||
|
||||
|
BIN
test/ExecutionEngine/RuntimeDyld/Inputs/arm_secdiff_reloc.o
Normal file
BIN
test/ExecutionEngine/RuntimeDyld/Inputs/arm_secdiff_reloc.o
Normal file
Binary file not shown.
1
test/ExecutionEngine/RuntimeDyld/arm_secdiff_reloc.test
Normal file
1
test/ExecutionEngine/RuntimeDyld/arm_secdiff_reloc.test
Normal file
@ -0,0 +1 @@
|
||||
RUN: llvm-rtdyld -printline %p/Inputs/arm_secdiff_reloc.o
|
1
test/ExecutionEngine/RuntimeDyld/lit.local.cfg
Normal file
1
test/ExecutionEngine/RuntimeDyld/lit.local.cfg
Normal file
@ -0,0 +1 @@
|
||||
config.suffixes = ['.test']
|
Loading…
Reference in New Issue
Block a user