diff options
Diffstat (limited to 'lib/Target/X86/X86GOTPLT.h')
-rw-r--r-- | lib/Target/X86/X86GOTPLT.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/lib/Target/X86/X86GOTPLT.h b/lib/Target/X86/X86GOTPLT.h index f288fa4..8e13fac 100644 --- a/lib/Target/X86/X86GOTPLT.h +++ b/lib/Target/X86/X86GOTPLT.h @@ -14,7 +14,7 @@ #include <llvm/ADT/DenseMap.h> -#include <mcld/Target/GOT.h> +#include "X86GOT.h" namespace mcld { @@ -23,27 +23,33 @@ class LDSection; const unsigned int X86GOTPLT0Num = 3; -class X86GOTPLTEntry : public GOT::Entry<4> +/** \class X86_32GOTPLT + * \brief X86_32 .got.plt section. + */ +class X86_32GOTPLT : public X86_32GOT { public: - X86GOTPLTEntry(uint64_t pContent, SectionData* pParent) - : GOT::Entry<4>(pContent, pParent) - {} + X86_32GOTPLT(LDSection &pSection); + + ~X86_32GOTPLT(); + + // hasGOT1 - return if this section has any GOT1 entry + bool hasGOT1() const; + + void applyGOT0(uint64_t pAddress); + + void applyAllGOTPLT(const X86PLT& pPLT); }; -/** \class X86GOTPLT - * \brief X86 .got.plt section. +/** \class X86_64GOTPLT + * \brief X86_64 .got.plt section. */ -class X86GOTPLT : public GOT +class X86_64GOTPLT : public X86_64GOT { public: - X86GOTPLT(LDSection &pSection); + X86_64GOTPLT(LDSection &pSection); - ~X86GOTPLT(); - - void reserve(size_t pNum = 1); - - X86GOTPLTEntry* consume(); + ~X86_64GOTPLT(); // hasGOT1 - return if this section has any GOT1 entry bool hasGOT1() const; @@ -51,9 +57,6 @@ public: void applyGOT0(uint64_t pAddress); void applyAllGOTPLT(const X86PLT& pPLT); - -private: - X86GOTPLTEntry* m_pLast; ///< the last consumed entry }; } // namespace of mcld |