X86GOT.h revision 533eae20118036f425f27bf0536ef0ccbb090b65
1//===- X86GOT.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_X86_X86GOT_H 10#define TARGET_X86_X86GOT_H 11 12#include <mcld/Target/GOT.h> 13 14namespace mcld { 15 16class LDSection; 17class SectionData; 18 19/** \class X86_32GOTEntry 20 * \brief GOT Entry with size of 4 bytes 21 */ 22class X86_32GOTEntry : public GOT::Entry<4> 23{ 24public: 25 X86_32GOTEntry(uint64_t pContent, SectionData* pParent) 26 : GOT::Entry<4>(pContent, pParent) 27 {} 28}; 29 30/** \class X86_32GOT 31 * \brief X86_32 Global Offset Table. 32 */ 33 34class X86_32GOT : public GOT 35{ 36public: 37 X86_32GOT(LDSection& pSection); 38 39 ~X86_32GOT(); 40 41 X86_32GOTEntry* create(); 42}; 43 44/** \class X86_64GOTEntry 45 * \brief GOT Entry with size of 8 bytes 46 */ 47class X86_64GOTEntry : public GOT::Entry<8> 48{ 49public: 50 X86_64GOTEntry(uint64_t pContent, SectionData* pParent) 51 : GOT::Entry<8>(pContent, pParent) 52 {} 53}; 54 55/** \class X86_64GOT 56 * \brief X86_64 Global Offset Table. 57 */ 58 59class X86_64GOT : public GOT 60{ 61public: 62 X86_64GOT(LDSection& pSection); 63 64 ~X86_64GOT(); 65 66 X86_64GOTEntry* create(); 67}; 68 69} // namespace of mcld 70 71#endif 72 73