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

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 11:16:20 PST 2016


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));
 }
 
 template <class ELFT>




More information about the llvm-commits mailing list