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