summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86GOTPLT.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-03-04 19:51:03 -0800
committerStephen Hines <srhines@google.com>2013-03-04 20:01:30 -0800
commit6f75755c9204b1d8817ae5a65a2f7e5af0ec3f70 (patch)
tree35a64dc0a0ad870f64fae2c88f4357d88270def8 /lib/Target/X86/X86GOTPLT.h
parent86036a3bd999904d071826b2f0a84023e28aeebc (diff)
downloadmclinker-6f75755c9204b1d8817ae5a65a2f7e5af0ec3f70.tar.gz
Change-Id: Ibae073aefc7838fce46875a6bf6ce7b7e18eced8 Date: Mon Mar 4 22:29:06 2013 +0100
Diffstat (limited to 'lib/Target/X86/X86GOTPLT.h')
-rw-r--r--lib/Target/X86/X86GOTPLT.h37
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