diff options
Diffstat (limited to 'lld/ELF/Target.cpp')
| -rw-r--r-- | lld/ELF/Target.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index d2c8391..e2a64dd 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -504,7 +504,7 @@ int64_t X86TargetInfo::getImplicitAddend(const uint8_t *Buf, case R_386_PC32: case R_386_PLT32: case R_386_TLS_LE: - return read32le(Buf); + return SignExtend64<32>(read32le(Buf)); } } @@ -2262,7 +2262,7 @@ int64_t MipsTargetInfo<ELFT>::getImplicitAddend(const uint8_t *Buf, case R_MIPS_GPREL32: case R_MIPS_TLS_DTPREL32: case R_MIPS_TLS_TPREL32: - return read32<E>(Buf); + return SignExtend64<32>(read32<E>(Buf)); case R_MIPS_26: // FIXME (simon): If the relocation target symbol is not a PLT entry // we should use another expression for calculation: |
