summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Target.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Target.cpp')
-rw-r--r--lld/ELF/Target.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index aea6eabf7df..ccc0efacbae 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -83,7 +83,6 @@ public:
uint64_t getImplicitAddend(const uint8_t *Buf, uint32_t Type) const override;
void writeGotPltHeader(uint8_t *Buf) const override;
uint32_t getDynRel(uint32_t Type) const override;
- uint32_t getTlsGotRel(uint32_t Type) const override;
bool isTlsLocalDynamicRel(uint32_t Type) const override;
bool isTlsGlobalDynamicRel(uint32_t Type) const override;
bool isTlsInitialExecRel(uint32_t Type) const override;
@@ -104,7 +103,6 @@ public:
X86_64TargetInfo();
RelExpr getRelExpr(uint32_t Type, const SymbolBody &S) const override;
uint32_t getDynRel(uint32_t Type) const override;
- uint32_t getTlsGotRel(uint32_t Type) const override;
bool isTlsLocalDynamicRel(uint32_t Type) const override;
bool isTlsGlobalDynamicRel(uint32_t Type) const override;
bool isTlsInitialExecRel(uint32_t Type) const override;
@@ -148,7 +146,6 @@ public:
void writePltZero(uint8_t *Buf) const override;
void writePlt(uint8_t *Buf, uint64_t GotEntryAddr, uint64_t PltEntryAddr,
int32_t Index, unsigned RelOff) const override;
- uint32_t getTlsGotRel(uint32_t Type) const override;
bool usesOnlyLowPageBits(uint32_t Type) const override;
void relocateOne(uint8_t *Loc, uint32_t Type, uint64_t Val) const override;
void relaxTlsGdToLe(uint8_t *Loc, uint32_t Type, uint64_t Val) const override;
@@ -319,12 +316,6 @@ uint32_t X86TargetInfo::getDynRel(uint32_t Type) const {
return Type;
}
-uint32_t X86TargetInfo::getTlsGotRel(uint32_t Type) const {
- if (Type == R_386_TLS_IE)
- return Type;
- return R_386_GOT32;
-}
-
bool X86TargetInfo::isTlsGlobalDynamicRel(uint32_t Type) const {
return Type == R_386_TLS_GD;
}
@@ -584,13 +575,6 @@ uint32_t X86_64TargetInfo::getDynRel(uint32_t Type) const {
return Type;
}
-uint32_t X86_64TargetInfo::getTlsGotRel(uint32_t Type) const {
- // No other types of TLS relocations requiring GOT should
- // reach here.
- assert(Type == R_X86_64_GOTTPOFF);
- return R_X86_64_PC32;
-}
-
bool X86_64TargetInfo::isTlsInitialExecRel(uint32_t Type) const {
return Type == R_X86_64_GOTTPOFF;
}
@@ -727,6 +711,7 @@ void X86_64TargetInfo::relocateOne(uint8_t *Loc, uint32_t Type,
case R_X86_64_GOTPCRELX:
case R_X86_64_REX_GOTPCRELX:
case R_X86_64_PC32:
+ case R_X86_64_GOTTPOFF:
case R_X86_64_PLT32:
case R_X86_64_TLSGD:
case R_X86_64_TLSLD:
@@ -1063,12 +1048,6 @@ void AArch64TargetInfo::writePlt(uint8_t *Buf, uint64_t GotEntryAddr,
relocateOne(Buf + 8, R_AARCH64_ADD_ABS_LO12_NC, GotEntryAddr);
}
-uint32_t AArch64TargetInfo::getTlsGotRel(uint32_t Type) const {
- assert(Type == R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 ||
- Type == R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC);
- return Type;
-}
-
static void updateAArch64Addr(uint8_t *L, uint64_t Imm) {
uint32_t ImmLo = (Imm & 0x3) << 29;
uint32_t ImmHi = ((Imm & 0x1FFFFC) >> 2) << 5;
OpenPOWER on IntegriCloud