diff options
Diffstat (limited to 'lib/Target/X86/X86GOTPLT.h')
-rw-r--r-- | lib/Target/X86/X86GOTPLT.h | 41 |
1 files changed, 7 insertions, 34 deletions
diff --git a/lib/Target/X86/X86GOTPLT.h b/lib/Target/X86/X86GOTPLT.h index 7ca695b..b2fa65a 100644 --- a/lib/Target/X86/X86GOTPLT.h +++ b/lib/Target/X86/X86GOTPLT.h @@ -15,10 +15,10 @@ #include <llvm/ADT/DenseMap.h> #include <mcld/Target/GOT.h> -#include <mcld/LD/SectionData.h> -namespace mcld -{ +namespace mcld { + +class X86PLT; class LDSection; const unsigned int X86GOTPLT0Num = 3; @@ -28,44 +28,17 @@ const unsigned int X86GOTPLT0Num = 3; */ class X86GOTPLT : public GOT { - typedef llvm::DenseMap<const ResolveInfo*, GOTEntry*> SymbolIndexMapType; - public: - typedef SectionData::iterator iterator; - typedef SectionData::const_iterator const_iterator; - -public: - X86GOTPLT(LDSection &pSection, SectionData& pSectionData); + X86GOTPLT(LDSection &pSection); ~X86GOTPLT(); - iterator begin(); - - const_iterator begin() const; - - iterator end(); + // hasGOT1 - return if this section has any GOT1 entry + bool hasGOT1() const; - const_iterator end() const; - -// For GOT0 -public: void applyGOT0(uint64_t pAddress); -// For GOTPLT -public: - void reserveEntry(size_t pNum = 1); - - GOTEntry* getEntry(const ResolveInfo& pSymbol, bool& pExist); - - void applyAllGOTPLT(uint64_t pPLTBase, - unsigned int pPLT0Size, - unsigned int pPLT1Size); - - GOTEntry*& lookupGOTPLTMap(const ResolveInfo& pSymbol); - -private: - iterator m_GOTPLTIterator; - SymbolIndexMapType m_GOTPLTMap; + void applyAllGOTPLT(const X86PLT& pPLT); }; } // namespace of mcld |