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