summaryrefslogtreecommitdiff
path: root/lib/Target/GOT.cpp
blob: a05b574c5660129372c35596f09e0b077d5b1d14 (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
//===- GOT.cpp ------------------------------------------------------------===//
//
//                     The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <mcld/Target/GOT.h>
#include <cstring>
#include <cstdlib>

using namespace mcld;

//===----------------------------------------------------------------------===//
// GOTEntry
GOTEntry::GOTEntry(uint64_t pContent, size_t pEntrySize,
                   llvm::MCSectionData* pParent)
  : MCTargetFragment(llvm::MCFragment::FT_Target, pParent),
    f_Content(pContent), m_EntrySize(pEntrySize) {
}

GOTEntry::~GOTEntry()
{
}

//===----------------------------------------------------------------------===//
// GOT
GOT::GOT(LDSection& pSection,
         llvm::MCSectionData& pSectionData,
         size_t pEntrySize)
  : m_Section(pSection),
    m_SectionData(pSectionData),
    f_EntrySize(pEntrySize) {
}

GOT::~GOT()
{
}

size_t GOT::getEntrySize() const
{
  return f_EntrySize;
}