[lld] r287799 - Fix this on 32 bit hosts.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 11:56:25 PST 2016
On Wed, Nov 23, 2016 at 11:53 AM, Rui Ueyama via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> 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.
>
-1. I personally prefer to be explicit.
--
Davide
"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
More information about the llvm-commits
mailing list