diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-09-22 17:08:25 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-09-22 17:08:25 +0000 |
| commit | 454ca1c2450ed32c622409e24270a9e068a526ec (patch) | |
| tree | 8ed983fb03492039cae5634ad09a992485860681 | |
| parent | 23a3b0e8a4a95e6d0337ec431c2034247df34112 (diff) | |
| download | bcm5719-llvm-454ca1c2450ed32c622409e24270a9e068a526ec.tar.gz bcm5719-llvm-454ca1c2450ed32c622409e24270a9e068a526ec.zip | |
Use a signed value for Delta.
This fixes got.s on 32 bit windows.
Patch by Igor Kudrin!
llvm-svn: 248289
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 3a8a6519a8d..4fc87ded169 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -48,7 +48,7 @@ template <class ELFT> void PltSection<ELFT>::writeTo(uint8_t *Buf) { Buf += Jmp.size(); uintptr_t OffsetInPLT = (InstPos + 6) - Start; - uintptr_t Delta = GotSec.getEntryAddr(*E) - (this->getVA() + OffsetInPLT); + intptr_t Delta = GotSec.getEntryAddr(*E) - (this->getVA() + OffsetInPLT); assert(isInt<32>(Delta)); support::endian::write32le(Buf, Delta); Buf += 4; |

