[lld] r287799 - Fix this on 32 bit hosts.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 11:53:38 PST 2016


On Wed, Nov 23, 2016 at 11:16 AM, Rafael Espindola via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: rafael
> Date: Wed Nov 23 13:16:20 2016
> New Revision: 287799
>
> URL: http://llvm.org/viewvc/llvm-project?rev=287799&view=rev
> Log:
> Fix this on 32 bit hosts.
>
> Looks like we have no 32 bit bot that builds with mips support.
>
> Modified:
>     lld/trunk/ELF/SyntheticSections.cpp
>
> Modified: lld/trunk/ELF/SyntheticSections.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/
> SyntheticSections.cpp?rev=287799&r1=287798&r2=287799&view=diff
> ============================================================
> ==================
> --- lld/trunk/ELF/SyntheticSections.cpp (original)
> +++ lld/trunk/ELF/SyntheticSections.cpp Wed Nov 23 13:16:20 2016
> @@ -178,7 +178,7 @@ template <class ELFT> void MipsOptionsSe
>
>    if (!Config->Relocatable)
>      Reginfo.ri_gp_value = In<ELFT>::MipsGot->getVA() + MipsGPOffset;
> -  memcpy(Buf + sizeof(Options), &Reginfo, sizeof(Reginfo));
> +  memcpy(Buf + sizeof(typename ELFT::uint), &Reginfo, sizeof(Reginfo));
>

Probably sizeof(*Options) is better.


>  }
>
>  template <class ELFT>
>
>
> _______________________________________________
> 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/20161123/60e04101/attachment.html>


More information about the llvm-commits mailing list