diff options
-rw-r--r-- | lld/ELF/InputSection.cpp | 6 | ||||
-rw-r--r-- | lld/ELF/Symbols.cpp | 7 | ||||
-rw-r--r-- | lld/ELF/Symbols.h | 2 |
3 files changed, 5 insertions, 10 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index a151e086c21..4e519ca0dd4 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -400,7 +400,7 @@ getRelocTargetVA(uint32_t Type, int64_t A, typename ELFT::uint P, return Body.getVA(A); case R_GOT: case R_RELAX_TLS_GD_TO_IE_ABS: - return Body.getGotVA<ELFT>() + A; + return Body.getGotVA() + A; case R_GOTONLY_PC: return InX::Got->getVA() + A - P; case R_GOTONLY_PC_FROM_END: @@ -416,10 +416,10 @@ getRelocTargetVA(uint32_t Type, int64_t A, typename ELFT::uint P, return Body.getGotOffset() + A; case R_GOT_PAGE_PC: case R_RELAX_TLS_GD_TO_IE_PAGE_PC: - return getAArch64Page(Body.getGotVA<ELFT>() + A) - getAArch64Page(P); + return getAArch64Page(Body.getGotVA() + A) - getAArch64Page(P); case R_GOT_PC: case R_RELAX_TLS_GD_TO_IE: - return Body.getGotVA<ELFT>() + A - P; + return Body.getGotVA() + A - P; case R_HINT: case R_NONE: case R_TLSDESC_CALL: diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index 4032504f437..7ce1f5354b1 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -163,7 +163,7 @@ uint64_t SymbolBody::getVA(int64_t Addend) const { return OutVA + Addend; } -template <class ELFT> typename ELFT::uint SymbolBody::getGotVA() const { +uint64_t SymbolBody::getGotVA() const { return InX::Got->getVA() + getGotOffset(); } @@ -370,11 +370,6 @@ std::string lld::toString(const SymbolBody &B) { return B.getName(); } -template uint32_t SymbolBody::template getGotVA<ELF32LE>() const; -template uint32_t SymbolBody::template getGotVA<ELF32BE>() const; -template uint64_t SymbolBody::template getGotVA<ELF64LE>() const; -template uint64_t SymbolBody::template getGotVA<ELF64BE>() const; - template uint32_t SymbolBody::template getSize<ELF32LE>() const; template uint32_t SymbolBody::template getSize<ELF32BE>() const; template uint64_t SymbolBody::template getSize<ELF64LE>() const; diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index 39a0c0f7b4d..030527f6374 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -78,7 +78,7 @@ public: uint64_t getVA(int64_t Addend = 0) const; uint64_t getGotOffset() const; - template <class ELFT> typename ELFT::uint getGotVA() const; + uint64_t getGotVA() const; uint64_t getGotPltOffset() const; uint64_t getGotPltVA() const; uint64_t getPltVA() const; |