1//===- MipsGOTPLT.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 TARGET_MIPS_MIPSGOTPLT_H_ 10#define TARGET_MIPS_MIPSGOTPLT_H_ 11 12#include "mcld/Support/MemoryRegion.h" 13#include "mcld/Target/GOT.h" 14#include <llvm/ADT/DenseMap.h> 15 16namespace mcld { 17 18class LDSection; 19 20/** \class MipsGOTPLT 21 * \brief Mips .got.plt section. 22 */ 23class MipsGOTPLT : public GOT { 24 public: 25 explicit MipsGOTPLT(LDSection& pSection); 26 27 // hasGOT1 - return if this section has any GOT1 entry 28 bool hasGOT1() const; 29 30 uint64_t getEntryAddr(size_t num) const; 31 32 uint64_t emit(MemoryRegion& pRegion); 33 34 Fragment* create(); 35 36 void applyAllGOTPLT(uint64_t pltAddr); 37}; 38 39} // namespace mcld 40 41#endif // TARGET_MIPS_MIPSGOTPLT_H_ 42