HexagonGOT.h revision 6f75755c9204b1d8817ae5a65a2f7e5af0ec3f70
1//===- HexagonGOT.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_TARGET_HEXAGON_GOT_H
10#define MCLD_TARGET_HEXAGON_GOT_H
11#ifdef ENABLE_UNITTEST
12#include <gtest.h>
13#endif
14
15#include <mcld/Target/GOT.h>
16
17namespace mcld {
18
19class LDSection;
20class SectionData;
21
22/** \class HexagonGOTEntry
23 *  \brief GOT Entry with size of 4 bytes
24 */
25class HexagonGOTEntry : public GOT::Entry<4>
26{
27public:
28  HexagonGOTEntry(uint64_t pContent, SectionData* pParent)
29   : GOT::Entry<4>(pContent, pParent)
30  {}
31};
32
33/** \class HexagonGOT
34 *  \brief Hexagon Global Offset Table.
35 */
36
37class HexagonGOT : public GOT
38{
39public:
40  HexagonGOT(LDSection& pSection);
41
42  ~HexagonGOT();
43
44  void reserve(size_t pNum = 1);
45
46  HexagonGOTEntry* consume();
47
48private:
49  HexagonGOTEntry* m_pLast; ///< the last consumed entry
50};
51
52} // namespace of mcld
53
54#endif
55
56