[all-commits] [llvm/llvm-project] 875ee9: [lld][WebAssembly] Handle TLS symbols in older obj...

Sam Clegg via All-commits all-commits at lists.llvm.org
Thu Jan 27 17:27:32 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 875ee937ae7c6588e0476edd15cf75185e70ac68
      https://github.com/llvm/llvm-project/commit/875ee937ae7c6588e0476edd15cf75185e70ac68
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2022-01-27 (Thu, 27 Jan 2022)

  Changed paths:
    A lld/test/wasm/tls-implicit.yaml
    M lld/wasm/InputChunks.h
    M lld/wasm/InputFiles.cpp
    M llvm/lib/ObjectYAML/WasmEmitter.cpp

  Log Message:
  -----------
  [lld][WebAssembly] Handle TLS symbols in older object file

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

Differential Revision: https://reviews.llvm.org/D118414




More information about the All-commits mailing list