Home | History | Annotate | Download | only in X86
      1 //===- X86ELFDynamic.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 "X86ELFDynamic.h"
     10 
     11 #include <mcld/LD/ELFFileFormat.h>
     12 
     13 using namespace mcld;
     14 
     15 X86ELFDynamic::X86ELFDynamic(const GNULDBackend& pParent,
     16                              const LinkerConfig& pConfig)
     17   : ELFDynamic(pParent, pConfig)
     18 {
     19 }
     20 
     21 X86ELFDynamic::~X86ELFDynamic()
     22 {
     23 }
     24 
     25 void X86ELFDynamic::reserveTargetEntries(const ELFFileFormat& pFormat)
     26 {
     27   // reservePLTGOT
     28   if (pFormat.hasGOTPLT())
     29     reserveOne(llvm::ELF::DT_PLTGOT);
     30 }
     31 
     32 void X86ELFDynamic::applyTargetEntries(const ELFFileFormat& pFormat)
     33 {
     34   // applyPLTGOT
     35   if (pFormat.hasGOTPLT())
     36     applyOne(llvm::ELF::DT_PLTGOT, pFormat.getGOTPLT().addr());
     37 }
     38