GOT.cpp revision 5460a1f25d9ddecb5c70667267d66d51af177a99
1//===- GOT.cpp ------------------------------------------------------------===//
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#include <mcld/Target/GOT.h>
10#include <cstring>
11#include <cstdlib>
12
13using namespace mcld;
14
15//===----------------------------------------------------------------------===//
16// GOTEntry
17GOTEntry::GOTEntry(uint64_t pContent, size_t pEntrySize,
18                   llvm::MCSectionData* pParent)
19  : MCTargetFragment(llvm::MCFragment::FT_Target, pParent),
20    f_Content(pContent), m_EntrySize(pEntrySize) {
21}
22
23GOTEntry::~GOTEntry()
24{
25}
26
27//===----------------------------------------------------------------------===//
28// GOT
29GOT::GOT(LDSection& pSection,
30         llvm::MCSectionData& pSectionData,
31         size_t pEntrySize)
32  : m_Section(pSection),
33    m_SectionData(pSectionData),
34    f_EntrySize(pEntrySize) {
35}
36
37GOT::~GOT()
38{
39}
40
41size_t GOT::getEntrySize() const
42{
43  return f_EntrySize;
44}
45
46