diff options
author | Lang Hames <lhames@gmail.com> | 2014-05-12 21:39:59 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-05-12 21:39:59 +0000 |
commit | 36072da3d9e677edd75e2b39656eae708f12676a (patch) | |
tree | 8cb3172f5494998819b5f92169274bf3f589edb4 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h | |
parent | e323670892d25d76435d831d73c3837ed8890213 (diff) | |
download | bcm5719-llvm-36072da3d9e677edd75e2b39656eae708f12676a.tar.gz bcm5719-llvm-36072da3d9e677edd75e2b39656eae708f12676a.zip |
[RuntimeDyld] Add support for MachO __jump_table and __pointers sections, and
SECTDIFF relocations on 32-bit x86.
This fixes several of the MCJIT regression test failures that show up on 32-bit
builds.
<rdar://problem/16886294>
llvm-svn: 208635
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h index f52d22ce226..412cf20a5c7 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h @@ -90,9 +90,17 @@ public: /// used to make a relocation section relative instead of symbol relative. int64_t Addend; + struct SectionPair { + uint32_t SectionA; + uint32_t SectionB; + }; + /// SymOffset - Section offset of the relocation entry's symbol (used for GOT /// lookup). - uint64_t SymOffset; + union { + uint64_t SymOffset; + SectionPair Sections; + }; /// True if this is a PCRel relocation (MachO specific). bool IsPCRel; @@ -113,6 +121,16 @@ public: bool IsPCRel, unsigned Size) : SectionID(id), Offset(offset), RelType(type), Addend(addend), SymOffset(0), IsPCRel(IsPCRel), Size(Size) {} + + RelocationEntry(unsigned id, uint64_t offset, uint32_t type, int64_t addend, + unsigned SectionA, uint64_t SectionAOffset, unsigned SectionB, + uint64_t SectionBOffset, bool IsPCRel, unsigned Size) + : SectionID(id), Offset(offset), RelType(type), + Addend(SectionAOffset - SectionBOffset + addend), IsPCRel(IsPCRel), + Size(Size) { + Sections.SectionA = SectionA; + Sections.SectionB = SectionB; + } }; class RelocationValueRef { @@ -373,7 +391,7 @@ public: virtual void deregisterEHFrames(); - virtual void finalizeLoad(ObjSectionToIDMap &SectionMap) {} + virtual void finalizeLoad(ObjectImage &ObjImg, ObjSectionToIDMap &SectionMap) {} }; } // end namespace llvm |