diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-10-05 01:52:09 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-10-05 01:52:09 +0000 |
commit | 480dcb3ee716849072b99d9df0ca5d1450b98e80 (patch) | |
tree | 7e89203c8fac27170bb6a0f5867d495b7b60791a /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h | |
parent | c174ea9ac84f83fcee05aff1b0be2ea4dfa1a9d5 (diff) | |
download | bcm5719-llvm-480dcb3ee716849072b99d9df0ca5d1450b98e80.tar.gz bcm5719-llvm-480dcb3ee716849072b99d9df0ca5d1450b98e80.zip |
Adding multiple GOT handling to RuntimeDyldELF
Patch by Ashok Thirumurthi
llvm-svn: 192020
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h index 14fb5740e5f..67dc693b1b6 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h @@ -15,6 +15,7 @@ #define LLVM_RUNTIME_DYLD_ELF_H #include "RuntimeDyldImpl.h" +#include "llvm/ADT/DenseMap.h" using namespace llvm; @@ -91,12 +92,15 @@ class RuntimeDyldELF : public RuntimeDyldImpl { virtual void updateGOTEntries(StringRef Name, uint64_t Addr); - SmallVector<RelocationValueRef, 2> GOTEntries; - unsigned GOTSectionID; + // Relocation entries for symbols whose position-independant offset is + // updated in a global offset table. + typedef unsigned SID; // Type for SectionIDs + typedef SmallVector<RelocationValueRef, 2> GOTRelocations; + GOTRelocations GOTEntries; // List of entries requiring finalization. + SmallVector<std::pair<SID, GOTRelocations>, 8> GOTs; // Allocated tables. public: - RuntimeDyldELF(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm), - GOTSectionID(0) + RuntimeDyldELF(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm) {} virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value); |