[PATCH] D60994: [PPC64] Allow R_PPC64_DTPREL* to preemptable local-dynamic symbols

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 23:24:57 PDT 2019


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: ELF/Relocations.cpp:251
   // Local-Dynamic relocs can be relaxed to Local-Exec.
-  // TODO Delete R_ABS after all R_*_DTPREL_* relocations migrate to R_DTPREL.
-  if ((Expr == R_ABS || Expr == R_DTPREL) && !Config->Shared) {
+  if (Expr == R_DTPREL && !Config->Shared) {
     C.Relocations.push_back(
----------------
`relaxTlsLdToLe` is redefined by PPC64 X86 X86_64 (no MIPS). So PPC64 is the last user.


================
Comment at: test/ELF/ppc64-tls-ld-preemptable.s:9
+# 42 - 0x8000 = -32726
+# CHECK:      addis 4, 3, 0
+# CHECK-NEXT: addi 4, 4, -32726
----------------
The disassembled instructions are consistent with ld.bfd and gold

`R_DTPREL` can just use `return Sym.getVA(A);`


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60994/new/

https://reviews.llvm.org/D60994





More information about the llvm-commits mailing list