Index: lld/trunk/ELF/OutputSections.cpp =================================================================== --- lld/trunk/ELF/OutputSections.cpp +++ lld/trunk/ELF/OutputSections.cpp @@ -48,7 +48,8 @@ Buf += Jmp.size(); uintptr_t OffsetInPLT = (InstPos + 6) - Start; - uintptr_t Delta = GotSec.getEntryAddr(*E) - (this->getVA() + OffsetInPLT); + intptr_t Delta = static_cast(GotSec.getEntryAddr(*E)) - + static_cast(this->getVA() + OffsetInPLT); assert(isInt<32>(Delta)); support::endian::write32le(Buf, Delta); Buf += 4;