summaryrefslogtreecommitdiff
path: root/lib/Target/Hexagon/HexagonGOT.h
blob: c29239cab3b291cec36d4cf1e74abdfcee025ca0 (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
47
48
49
50
51
52
53
//===- HexagonGOT.h -------------------------------------------------------===//
//
//                     The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef MCLD_TARGET_HEXAGON_GOT_H
#define MCLD_TARGET_HEXAGON_GOT_H
#ifdef ENABLE_UNITTEST
#include <gtest.h>
#endif

#include <mcld/Target/GOT.h>

namespace mcld {

class LDSection;
class SectionData;

/** \class HexagonGOTEntry
 *  \brief GOT Entry with size of 4 bytes
 */
class HexagonGOTEntry : public GOT::Entry<4>
{
public:
  HexagonGOTEntry(uint64_t pContent, SectionData* pParent)
   : GOT::Entry<4>(pContent, pParent)
  {}
};

/** \class HexagonGOT
 *  \brief Hexagon Global Offset Table.
 */

class HexagonGOT : public GOT
{
public:
  HexagonGOT(LDSection& pSection);

  ~HexagonGOT();

  HexagonGOTEntry* create();

private:
  HexagonGOTEntry* m_pLast; ///< the last consumed entry
};

} // namespace of mcld

#endif