summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86GOTPLT.h
diff options
context:
space:
mode:
authorShih-wei Liao <sliao@google.com>2012-12-15 17:21:00 -0800
committerShih-wei Liao <sliao@google.com>2012-12-15 17:21:00 -0800
commit22add6ff3426df1a85089fe6a6e1597ee3b6f300 (patch)
treec58763780e7b965179d9cdce45f1fc5a5268932d /lib/Target/X86/X86GOTPLT.h
parentc842fe71ef087c982cc03d0ea73eeaf455d932d3 (diff)
downloadmclinker-22add6ff3426df1a85089fe6a6e1597ee3b6f300.tar.gz
MCLinker upstream commit 0459e386785c.
Change-Id: Ide6790f5a354b7fcc03d812d6c8cf43b1e309ba3
Diffstat (limited to 'lib/Target/X86/X86GOTPLT.h')
-rw-r--r--lib/Target/X86/X86GOTPLT.h41
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