[PATCH] D102908: [lld][ELF][SPARC] Support TLS IE relocations

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 22 15:16:43 PDT 2021


jrtc27 added inline comments.


================
Comment at: lld/ELF/Arch/SPARCV9.cpp:208
+  case R_SPARC_TLS_IE_LO10:
+    // or %r1, %tie_lo10(sym), %r2 -> xor %r1, %tle_hix22(sym), %r2
+    write32be(loc, (read32be(loc) & ~0x01f80000) | 0x180000);
----------------



================
Comment at: lld/ELF/Driver.cpp:929
   return m == EM_AARCH64 || m == EM_AMDGPU || m == EM_HEXAGON || m == EM_PPC ||
-         m == EM_PPC64 || m == EM_RISCV || m == EM_X86_64;
+         m == EM_PPC64 || m == EM_RISCV || m == EM_SPARCV9 || m == EM_X86_64;
 }
----------------
This should probably be its own commit, it's unrelated to TLS.


================
Comment at: lld/test/ELF/sparcv9-tls-ie.s:25
+
+.section .tbss
+  .globl a
----------------
All directives are normally indented to the same level


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

https://reviews.llvm.org/D102908



More information about the llvm-commits mailing list