[PATCH] D18039: [ELF] - Fixed handling R_X86_64_DTPOFF64 relocation relaxation

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 01:34:30 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: {
----------------
grimar wrote:
> 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.
So after closer look, that is a different situation. We can reach R_X86_64_TPOFF32 from code outside relaxTls.
tls.s testcase for example shows it:

```
movl %fs:a at tpoff, %eax
```
generates R_X86_64_TPOFF32 and we reach it from common flow: relocate()->relocateOne().


Repository:
  rL LLVM

http://reviews.llvm.org/D18039





More information about the llvm-commits mailing list