Home | History | Annotate | Download | only in Hexagon
      1 //===- HexagonGOTPLT.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 MCLD_HEXAGON_GOTPLT_H
     10 #define MCLD_HEXAGON_GOTPLT_H
     11 #ifdef ENABLE_UNITTEST
     12 #include <gtest.h>
     13 #endif
     14 
     15 #include <llvm/ADT/DenseMap.h>
     16 #include "HexagonGOT.h"
     17 #include <mcld/Support/MemoryRegion.h>
     18 
     19 namespace mcld {
     20 
     21 class HexagonPLT;
     22 class LDSection;
     23 
     24 // Hexagon creates 4 entries for the GOTPLT0 entry
     25 const unsigned int HexagonGOTPLT0Num = 4;
     26 
     27 /** \class HexagonGOTPLT
     28  *  \brief Hexagon .got.plt section.
     29  */
     30 class HexagonGOTPLT : public HexagonGOT
     31 {
     32 public:
     33   HexagonGOTPLT(LDSection &pSection);
     34 
     35   ~HexagonGOTPLT();
     36 
     37   // hasGOT1 - return if this section has any GOT1 entry
     38   bool hasGOT1() const;
     39 
     40   void applyGOT0(uint64_t pAddress);
     41 
     42   void applyAllGOTPLT(const HexagonPLT& pPLT);
     43 };
     44 
     45 } // namespace of mcld
     46 
     47 #endif
     48