[lld] r267673 - [ELF][MIPS] Remove getMipsGpAddr(). NFC

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 07:09:41 PDT 2016


Thanks!

On 27 April 2016 at 01:31, 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


More information about the llvm-commits mailing list