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 | ff9fa05905be716435460b5f6d32689041bf895b (patch) | |
tree | cf87025702b9a29ac6712f99993b445880b2ad1d /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h | |
parent | abd37961d55680e5e946b9e336ce14b4ac56f830 (diff) | |
download | llvm-ff9fa05905be716435460b5f6d32689041bf895b.tar.gz llvm-ff9fa05905be716435460b5f6d32689041bf895b.tar.bz2 llvm-ff9fa05905be716435460b5f6d32689041bf895b.tar.xz |
Adding PIC support for ELF on x86_64 platforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h')
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h index 794c7ece10..14fb5740e5 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h +++ b/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(); }; |