Skip to content

Commit 3505716

Browse files
author
George Rimar
committedApr 26, 2017
[ELF] - Remove dead TLS relocations relative code for MIPS and ARM
This code was not used because of handleARMTlsRelocation and handleMipsTlsRelocation methods that are called for these platforms instead of regular TLS code. Differential revision: https://reviews.llvm.org/D32355 llvm-svn: 301414
1 parent 828bd61 commit 3505716

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed
 

‎lld/ELF/Target.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@ class ARMTargetInfo final : public TargetInfo {
223223
bool isPicRel(uint32_t Type) const override;
224224
uint32_t getDynRel(uint32_t Type) const override;
225225
int64_t getImplicitAddend(const uint8_t *Buf, uint32_t Type) const override;
226-
bool isTlsLocalDynamicRel(uint32_t Type) const override;
227-
bool isTlsInitialExecRel(uint32_t Type) const override;
228226
void writeGotPlt(uint8_t *Buf, const SymbolBody &S) const override;
229227
void writeIgotPlt(uint8_t *Buf, const SymbolBody &S) const override;
230228
void writePltHeader(uint8_t *Buf) const override;
@@ -245,7 +243,6 @@ template <class ELFT> class MipsTargetInfo final : public TargetInfo {
245243
int64_t getImplicitAddend(const uint8_t *Buf, uint32_t Type) const override;
246244
bool isPicRel(uint32_t Type) const override;
247245
uint32_t getDynRel(uint32_t Type) const override;
248-
bool isTlsLocalDynamicRel(uint32_t Type) const override;
249246
void writeGotPlt(uint8_t *Buf, const SymbolBody &S) const override;
250247
void writePltHeader(uint8_t *Buf) const override;
251248
void writePlt(uint8_t *Buf, uint64_t GotPltEntryAddr, uint64_t PltEntryAddr,
@@ -2066,14 +2063,6 @@ int64_t ARMTargetInfo::getImplicitAddend(const uint8_t *Buf,
20662063
}
20672064
}
20682065

2069-
bool ARMTargetInfo::isTlsLocalDynamicRel(uint32_t Type) const {
2070-
return Type == R_ARM_TLS_LDO32 || Type == R_ARM_TLS_LDM32;
2071-
}
2072-
2073-
bool ARMTargetInfo::isTlsInitialExecRel(uint32_t Type) const {
2074-
return Type == R_ARM_TLS_IE32;
2075-
}
2076-
20772066
template <class ELFT> MipsTargetInfo<ELFT>::MipsTargetInfo() {
20782067
GotPltHeaderEntriesNum = 2;
20792068
DefaultMaxPageSize = 65536;
@@ -2165,11 +2154,6 @@ uint32_t MipsTargetInfo<ELFT>::getDynRel(uint32_t Type) const {
21652154
return RelativeRel;
21662155
}
21672156

2168-
template <class ELFT>
2169-
bool MipsTargetInfo<ELFT>::isTlsLocalDynamicRel(uint32_t Type) const {
2170-
return Type == R_MIPS_TLS_LDM;
2171-
}
2172-
21732157
template <class ELFT>
21742158
void MipsTargetInfo<ELFT>::writeGotPlt(uint8_t *Buf, const SymbolBody &) const {
21752159
write32<ELFT::TargetEndianness>(Buf, In<ELFT>::Plt->getVA());

0 commit comments

Comments
 (0)
Please sign in to comment.