Home | History | Annotate | Download | only in X86
      1 //===- X86GOTPLT.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_X86_X86GOTPLT_H
     10 #define TARGET_X86_X86GOTPLT_H
     11 
     12 #include <llvm/ADT/DenseMap.h>
     13 
     14 #include "X86GOT.h"
     15 
     16 namespace mcld {
     17 
     18 class X86PLT;
     19 class LDSection;
     20 
     21 const unsigned int X86GOTPLT0Num = 3;
     22 
     23 /** \class X86_32GOTPLT
     24  *  \brief X86_32 .got.plt section.
     25  */
     26 class X86_32GOTPLT : public X86_32GOT
     27 {
     28 public:
     29   X86_32GOTPLT(LDSection &pSection);
     30 
     31   ~X86_32GOTPLT();
     32 
     33   // hasGOT1 - return if this section has any GOT1 entry
     34   bool hasGOT1() const;
     35 
     36   void applyGOT0(uint64_t pAddress);
     37 
     38   void applyAllGOTPLT(const X86PLT& pPLT);
     39 };
     40 
     41 /** \class X86_64GOTPLT
     42  *  \brief X86_64 .got.plt section.
     43  */
     44 class X86_64GOTPLT : public X86_64GOT
     45 {
     46 public:
     47   X86_64GOTPLT(LDSection &pSection);
     48 
     49   ~X86_64GOTPLT();
     50 
     51   // hasGOT1 - return if this section has any GOT1 entry
     52   bool hasGOT1() const;
     53 
     54   void applyGOT0(uint64_t pAddress);
     55 
     56   void applyAllGOTPLT(const X86PLT& pPLT);
     57 };
     58 
     59 } // namespace of mcld
     60 
     61 #endif
     62 
     63