[lld] r267673 - [ELF][MIPS] Remove getMipsGpAddr(). NFC
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 12:50:08 PDT 2016
Nice. Thank you for doing this.
On Tue, Apr 26, 2016 at 10:31 PM, Simon Atanasyan via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: atanasyan
> Date: Wed Apr 27 00:31:28 2016
> New Revision: 267673
>
> URL: http://llvm.org/viewvc/llvm-project?rev=267673&view=rev
> Log:
> [ELF][MIPS] Remove getMipsGpAddr(). NFC
>
> Modified:
> lld/trunk/ELF/OutputSections.cpp
> lld/trunk/ELF/Target.cpp
> lld/trunk/ELF/Target.h
>
> Modified: lld/trunk/ELF/OutputSections.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=267673&r1=267672&r2=267673&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/OutputSections.cpp (original)
> +++ lld/trunk/ELF/OutputSections.cpp Wed Apr 27 00:31:28 2016
> @@ -1573,7 +1573,7 @@ MipsReginfoOutputSection<ELFT>::MipsRegi
> template <class ELFT>
> void MipsReginfoOutputSection<ELFT>::writeTo(uint8_t *Buf) {
> auto *R = reinterpret_cast<Elf_Mips_RegInfo *>(Buf);
> - R->ri_gp_value = getMipsGpAddr<ELFT>();
> + R->ri_gp_value = Out<ELFT>::Got->getVA() + MipsGPOffset;
> R->ri_gprmask = GprMask;
> }
>
>
> Modified: lld/trunk/ELF/Target.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=267673&r1=267672&r2=267673&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Target.cpp (original)
> +++ lld/trunk/ELF/Target.cpp Wed Apr 27 00:31:28 2016
> @@ -1595,17 +1595,5 @@ bool MipsTargetInfo<ELFT>::isRelRelative
> return false;
> }
> }
> -
> -// _gp is a MIPS-specific ABI-defined symbol which points to
> -// a location that is relative to GOT. This function returns
> -// the value for the symbol.
> -template <class ELFT> typename ELFT::uint getMipsGpAddr() {
> - return Out<ELFT>::Got->getVA() + MipsGPOffset;
> -}
> -
> -template uint32_t getMipsGpAddr<ELF32LE>();
> -template uint32_t getMipsGpAddr<ELF32BE>();
> -template uint64_t getMipsGpAddr<ELF64LE>();
> -template uint64_t getMipsGpAddr<ELF64BE>();
> }
> }
>
> Modified: lld/trunk/ELF/Target.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=267673&r1=267672&r2=267673&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Target.h (original)
> +++ lld/trunk/ELF/Target.h Wed Apr 27 00:31:28 2016
> @@ -97,7 +97,6 @@ public:
> uint64_t getPPC64TocBase();
>
> const unsigned MipsGPOffset = 0x7ff0;
> -template <class ELFT> typename ELFT::uint getMipsGpAddr();
>
> extern TargetInfo *Target;
> TargetInfo *createTarget();
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160427/777e4795/attachment.html>
More information about the llvm-commits
mailing list