• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- TargetLDBackend.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/LD/Relocation.h"
10 #include "mcld/LD/Layout.h"
11 #include "mcld/Target/TargetLDBackend.h"
12 
13 using namespace mcld;
14 
15 /* ** */
TargetLDBackend()16 TargetLDBackend::TargetLDBackend()
17   : m_pEhFrame(NULL) {
18 }
19 
~TargetLDBackend()20 TargetLDBackend::~TargetLDBackend()
21 {
22   if (NULL != m_pEhFrame)
23     delete m_pEhFrame;
24 }
25 
getEhFrame()26 EhFrame* TargetLDBackend::getEhFrame()
27 {
28   if (NULL == m_pEhFrame)
29     m_pEhFrame = new EhFrame();
30   return m_pEhFrame;
31 }
32 
getEhFrame() const33 const EhFrame* TargetLDBackend::getEhFrame() const
34 {
35   assert(NULL == m_pEhFrame);
36   return m_pEhFrame;
37 }
38