[PATCH] D74443: [lld][Hexagon] convert call x at GDPLT to call __tls_get_addr

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 16:03:49 PST 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Relocations.cpp:1988
+          for (Relocation &rel : isec->relocations)
+            if ((rel.sym->type == llvm::ELF::STT_TLS) &&
+                (rel.expr == R_PLT_PC)) {
----------------
excess parentheses can be dropped.


================
Comment at: lld/ELF/Writer.cpp:1824
+        nullptr, "__tls_get_addr", STB_GLOBAL, STV_DEFAULT, STT_NOTYPE});
+    partitions[sym->partition - 1].dynSymTab->addSymbol(sym);
+  }
----------------
`partitions[0]`


================
Comment at: lld/test/ELF/hexagon-tls-gd-xform.s:34
+
+# Looking at the above check, 0x10220+0x2007c must equal the entry for
+#  __tls_get_addr, 0x3029C
----------------
Use `## ` for comments.


================
Comment at: lld/test/ELF/hexagon-tls-gd-xform.s:37
+
+#RELA_GDPLT: Relocations [
+#RELA_GDPLT-NEXT  Section (5) .rela.plt {
----------------
`# RELA_GDPLT`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74443





More information about the llvm-commits mailing list