[lld] r269166 - [ELF] - Fixed failture of mips-64-got.s on x32 configuration.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 02:41:15 PDT 2016


Author: grimar
Date: Wed May 11 04:41:15 2016
New Revision: 269166

URL: http://llvm.org/viewvc/llvm-project?rev=269166&view=rev
Log:
[ELF] - Fixed failture of mips-64-got.s on x32 configuration.

win32 was my case.
Before that change test failed with next error for me:
23>  ******************** TEST 'lld :: ELF/mips-64-got.s' FAILED ********************
....
23>  Command 3 Stderr:
23>  relocation R_MIPS_GOT_PAGE out of range

Modified:
    lld/trunk/ELF/OutputSections.cpp

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=269166&r1=269165&r2=269166&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Wed May 11 04:41:15 2016
@@ -180,7 +180,7 @@ GotSection<ELFT>::getMipsLocalEntryOffse
   size_t NewIndex = MipsLocalGotPos.size() + 2;
   auto P = MipsLocalGotPos.insert(std::make_pair(EntryValue, NewIndex));
   assert(!P.second || MipsLocalGotPos.size() <= MipsLocalEntries);
-  return P.first->second * sizeof(uintX_t) - MipsGPOffset;
+  return (uintX_t)P.first->second * sizeof(uintX_t) - MipsGPOffset;
 }
 
 template <class ELFT>




More information about the llvm-commits mailing list