[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

llvm-svn: 269166
This commit is contained in:
George Rimar 2016-05-11 09:41:15 +00:00
parent e94459fa6c
commit 71e64b2df9
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ GotSection<ELFT>::getMipsLocalEntryOffset(uintX_t EntryValue) {
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>