You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.3 KiB
60 lines
1.3 KiB
//===- X86GOTPLT.h --------------------------------------------------------===//
|
|
//
|
|
// The MCLinker Project
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#ifndef TARGET_X86_X86GOTPLT_H_
|
|
#define TARGET_X86_X86GOTPLT_H_
|
|
|
|
#include "X86GOT.h"
|
|
|
|
#include <llvm/ADT/DenseMap.h>
|
|
|
|
namespace mcld {
|
|
|
|
class LDSection;
|
|
class X86PLT;
|
|
|
|
const unsigned int X86GOTPLT0Num = 3;
|
|
|
|
/** \class X86_32GOTPLT
|
|
* \brief X86_32 .got.plt section.
|
|
*/
|
|
class X86_32GOTPLT : public X86_32GOT {
|
|
public:
|
|
explicit X86_32GOTPLT(LDSection& pSection);
|
|
|
|
~X86_32GOTPLT();
|
|
|
|
// hasGOT1 - return if this section has any GOT1 entry
|
|
bool hasGOT1() const;
|
|
|
|
void applyGOT0(uint64_t pAddress);
|
|
|
|
void applyAllGOTPLT(const X86PLT& pPLT);
|
|
};
|
|
|
|
/** \class X86_64GOTPLT
|
|
* \brief X86_64 .got.plt section.
|
|
*/
|
|
class X86_64GOTPLT : public X86_64GOT {
|
|
public:
|
|
explicit X86_64GOTPLT(LDSection& pSection);
|
|
|
|
~X86_64GOTPLT();
|
|
|
|
// hasGOT1 - return if this section has any GOT1 entry
|
|
bool hasGOT1() const;
|
|
|
|
void applyGOT0(uint64_t pAddress);
|
|
|
|
void applyAllGOTPLT(const X86PLT& pPLT);
|
|
};
|
|
|
|
} // namespace mcld
|
|
|
|
#endif // TARGET_X86_X86GOTPLT_H_
|