PLT.cpp revision 22add6ff3426df1a85089fe6a6e1597ee3b6f300
1//===- PLT.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
10#include <mcld/Target/PLT.h>
11#include <mcld/IRBuilder.h>
12
13using namespace mcld;
14
15class GOT;
16
17//===----------------------------------------------------------------------===//
18// PLT::Entry
19//===----------------------------------------------------------------------===//
20PLT::Entry::Entry(size_t pSize, SectionData& pParent)
21  : TargetFragment(Fragment::Target, &pParent),
22    m_EntrySize(pSize), m_pContent(NULL)
23{
24}
25
26PLT::Entry::~Entry()
27{
28  if (m_pContent) {
29    free(m_pContent);
30    m_pContent = NULL;
31  }
32}
33
34//===----------------------------------------------------------------------===//
35// PLT
36//===----------------------------------------------------------------------===//
37PLT::PLT(LDSection& pSection)
38  :m_Section(pSection)
39{
40  m_SectionData = IRBuilder::CreateSectionData(pSection);
41}
42
43PLT::~PLT()
44{
45}
46
47