blob: 4eda0a6f9bdf154d71ce7dc5d5fff146d788887f [file] [log] [blame]
//===- TargetLDBackend.cpp ------------------------------------------------===//
//
// The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "mcld/LD/Relocation.h"
#include "mcld/LD/Layout.h"
#include "mcld/Target/TargetLDBackend.h"
using namespace mcld;
/* ** */
TargetLDBackend::TargetLDBackend()
: m_pEhFrame(NULL) {
}
TargetLDBackend::~TargetLDBackend()
{
if (NULL != m_pEhFrame)
delete m_pEhFrame;
}
EhFrame* TargetLDBackend::getEhFrame()
{
if (NULL == m_pEhFrame)
m_pEhFrame = new EhFrame();
return m_pEhFrame;
}
const EhFrame* TargetLDBackend::getEhFrame() const
{
assert(NULL == m_pEhFrame);
return m_pEhFrame;
}