[PATCH] D18039: [ELF] - Fixed handling R_X86_64_DTPOFF64 relocation relaxation
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 10:45:49 PST 2016
grimar added inline comments.
================
Comment at: ELF/Target.cpp:896-897
@@ -895,3 +895,4 @@
case R_X86_64_DTPOFF32:
relocateOne(Loc, BufEnd, R_X86_64_TPOFF32, P, SA);
return 0;
+ case R_X86_64_DTPOFF64: {
----------------
ruiu wrote:
> I guess this is the same? Please inline the code here in a follow-up patch.
Yes, looks so, will do that tomorrow.
================
Comment at: ELF/Target.cpp:900
@@ +899,3 @@
+ uint64_t Val = SA - Out<ELF64LE>::TlsPhdr->p_memsz;
+ checkInt<64>(Val, Type);
+ write64le(Loc, Val);
----------------
ruiu wrote:
> Does checkInt<64> do anything? A 64-bit integer is always within 64 bits.
You right.
Its implementation even has the opt-check for that.
```
inline bool isInt(int64_t x) {
return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));
}
```
http://reviews.llvm.org/D18039
More information about the llvm-commits
mailing list