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

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 15:58:26 PST 2022


sbc100 created this revision.
Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, dschuff.
sbc100 requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

In older versions of llvm (e.g. llvm 13), symbols were not individually
flagged as TLS.  In this case, the indent was to implicitly mark any
symbols defined in TLS segments as TLS.  However, we were not performing
this implicit conversion if the segment was explicitly marked as TLS

As it happens, llvm 13 was branched between the addition of the segment
flag and the addition of the symbol flag. See:

- segment flag added: https://reviews.llvm.org/D102202
- symbol flag added: https://reviews.llvm.org/D109426

Testing this is tricky because the assembler will imply the TLS status
of the symbol based on the segment its declared in, so we are forced to
use a yaml file here.

Fixes: https://github.com/emscripten-core/emscripten/issues/15891


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118414

Files:
  lld/test/wasm/tls-implicit.yaml
  lld/wasm/InputChunks.h
  lld/wasm/InputFiles.cpp
  llvm/lib/ObjectYAML/WasmEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118414.403824.patch
Type: text/x-patch
Size: 5952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220127/dcb5ebde/attachment.bin>


More information about the llvm-commits mailing list