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