summaryrefslogtreecommitdiff
path: root/lib/Target/Hexagon/HexagonGOTPLT.h
blob: a815229811fc7dda43ba3670046feaa08000700c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//===- HexagonGOTPLT.h ----------------------------------------------------===//
//
//                     The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef TARGET_HEXAGON_HEXAGONGOTPLT_H
#define TARGET_HEXAGON_HEXAGONGOTPLT_H
#ifdef ENABLE_UNITTEST
#include <gtest.h>
#endif

#include <llvm/ADT/DenseMap.h>
#include "HexagonGOT.h"

namespace mcld {

class HexagonPLT;
class LDSection;

// Hexagon creates 4 entries for the GOTPLT0 entry
const unsigned int HexagonGOTPLT0Num = 4;

/** \class HexagonGOTPLT
 *  \brief Hexagon .got.plt section.
 */
class HexagonGOTPLT : public HexagonGOT
{
public:
  HexagonGOTPLT(LDSection &pSection);

  ~HexagonGOTPLT();

  // hasGOT1 - return if this section has any GOT1 entry
  bool hasGOT1() const;

  void applyGOT0(uint64_t pAddress);

  void applyAllGOTPLT(const HexagonPLT& pPLT);
};

} // namespace of mcld

#endif