MipsPLT.h revision 87f34658dec9097d987d254a990ea7f311bfc95f
1//===- MipsPLT.h ----------------------------------------------------------===// 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#ifndef MCLD_TARGET_MIPS_PLT_H 10#define MCLD_TARGET_MIPS_PLT_H 11 12#include <mcld/Target/PLT.h> 13#include <mcld/Support/MemoryRegion.h> 14 15namespace mcld { 16 17class MipsGOTPLT; 18 19//===----------------------------------------------------------------------===// 20// MipsPLT 21//===----------------------------------------------------------------------===// 22/** \class MipsPLT 23 * \brief Mips Procedure Linkage Table 24 */ 25class MipsPLT : public PLT 26{ 27public: 28 MipsPLT(LDSection& pSection); 29 30 // hasPLT1 - return if this PLT has any PLTA/PLTB entries 31 bool hasPLT1() const; 32 33 uint64_t emit(MemoryRegion& pRegion); 34 35 Fragment* consume(); 36 37 void applyAllPLT(MipsGOTPLT& pGOTPLT); 38 39public: 40 // PLT 41 void reserveEntry(size_t pNum = 1); 42 void finalizeSectionSize(); 43 44private: 45 // the last consumed entry. 46 SectionData::iterator m_Last; 47}; 48 49} // namespace of mcld 50 51#endif 52