diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-08-19 23:27:43 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-08-19 23:27:43 +0000 |
commit | 4612fed911f5ef5c14158f960cab06fdff200dab (patch) | |
tree | cbc550f72284cbddb19b8bf5d22f6a98a4be36f8 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h | |
parent | f708c87078a8a3c5075d9a5a1c2f25c3618f6dbc (diff) | |
download | bcm5719-llvm-4612fed911f5ef5c14158f960cab06fdff200dab.tar.gz bcm5719-llvm-4612fed911f5ef5c14158f960cab06fdff200dab.zip |
Adding PIC support for ELF on x86_64 platforms
llvm-svn: 188726
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h index 794c7ece109..14fb5740e5f 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h @@ -35,13 +35,15 @@ class RuntimeDyldELF : public RuntimeDyldImpl { uint64_t Offset, uint64_t Value, uint32_t Type, - int64_t Addend); + int64_t Addend, + uint64_t SymOffset=0); void resolveX86_64Relocation(const SectionEntry &Section, uint64_t Offset, uint64_t Value, uint32_t Type, - int64_t Addend); + int64_t Addend, + uint64_t SymOffset); void resolveX86Relocation(const SectionEntry &Section, uint64_t Offset, @@ -84,8 +86,18 @@ class RuntimeDyldELF : public RuntimeDyldImpl { ObjSectionToIDMap &LocalSections, RelocationValueRef &Rel); + uint64_t findGOTEntry(uint64_t LoadAddr, uint64_t Offset); + size_t getGOTEntrySize(); + + virtual void updateGOTEntries(StringRef Name, uint64_t Addr); + + SmallVector<RelocationValueRef, 2> GOTEntries; + unsigned GOTSectionID; + public: - RuntimeDyldELF(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm) {} + RuntimeDyldELF(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm), + GOTSectionID(0) + {} virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value); virtual void processRelocationRef(unsigned SectionID, @@ -97,6 +109,7 @@ public: virtual bool isCompatibleFormat(const ObjectBuffer *Buffer) const; virtual ObjectImage *createObjectImage(ObjectBuffer *InputBuffer); virtual StringRef getEHFrameSection(); + virtual void finalizeLoad(); virtual ~RuntimeDyldELF(); }; |