[PATCH] D118414: [lld][WebAssembly] Handle TLS symbols in older object file

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 16:22:48 PST 2022


dschuff added inline comments.


================
Comment at: lld/test/wasm/tls-implicit.yaml:5
+# Verify compatability with older object files that didn't mark individual
+# symbols as TLS.   In this case the symbol `bar` is being use in a TLS-only
+# relocation (R_WASM_MEMORY_ADDR_TLS_SLEB) but is not itself marked as TLS.
----------------



================
Comment at: lld/test/wasm/tls-implicit.yaml:7
+# relocation (R_WASM_MEMORY_ADDR_TLS_SLEB) but is not itself marked as TLS.
+# However, because it is defined in a section (`.tdata`) that *is* marked as
+# TLS we implicitly mark bar as TLS.
----------------



================
Comment at: lld/wasm/InputFiles.cpp:582
     auto size = sym.Info.DataRef.Size;
-    if (seg->implicitTLS) {
+    // Support older (e.g. llvm 13) object files that pre-data the per-symbol
+    // TLS flag, and symbols were assumed to be TLS by defined defined in a TLS
----------------



================
Comment at: lld/wasm/InputFiles.cpp:583
+    // Support older (e.g. llvm 13) object files that pre-data the per-symbol
+    // TLS flag, and symbols were assumed to be TLS by defined defined in a TLS
+    // segment.
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118414



More information about the llvm-commits mailing list