[lld] r295062 - Sign extend remaining implicit addends for consistency.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 14 08:24:42 PST 2017
Author: rafael
Date: Tue Feb 14 10:24:42 2017
New Revision: 295062
URL: http://llvm.org/viewvc/llvm-project?rev=295062&view=rev
Log:
Sign extend remaining implicit addends for consistency.
Modified:
lld/trunk/ELF/Target.cpp
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=295062&r1=295061&r2=295062&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Tue Feb 14 10:24:42 2017
@@ -504,7 +504,7 @@ int64_t X86TargetInfo::getImplicitAddend
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>::getImplici
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:
More information about the llvm-commits
mailing list