• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- MipsPLT.h ----------------------------------------------------------===//
2 //
3 //                     The MCLinker Project
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 #ifndef TARGET_MIPS_MIPSPLT_H
10 #define TARGET_MIPS_MIPSPLT_H
11 
12 #include <mcld/Target/PLT.h>
13 #include <mcld/Support/MemoryRegion.h>
14 
15 namespace mcld {
16 
17 class MipsGOTPLT;
18 
19 //===----------------------------------------------------------------------===//
20 // MipsPLT
21 //===----------------------------------------------------------------------===//
22 /** \class MipsPLT
23  *  \brief Mips Procedure Linkage Table
24  */
25 class MipsPLT : public PLT
26 {
27 public:
28   MipsPLT(LDSection& pSection);
29 
30   // hasPLT1 - return if this PLT has any PLTA/PLTB entries
31   bool hasPLT1() const;
32 
33   uint64_t emit(MemoryRegion& pRegion);
34 
35   Fragment* consume();
36 
37   void applyAllPLT(MipsGOTPLT& pGOTPLT);
38 
39 public:
40   // PLT
41   void reserveEntry(size_t pNum = 1);
42   void finalizeSectionSize();
43 
44 private:
45   // the last consumed entry.
46   SectionData::iterator m_Last;
47 };
48 
49 } // namespace of mcld
50 
51 #endif
52