[all-commits] [llvm/llvm-project] 182b72: [lld][WebAssembly] Generate TLS relocation code al...

Sam Clegg via All-commits all-commits at lists.llvm.org
Fri Oct 29 13:26:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 182b72aa486f618907c2bb7581a9d123738767eb
      https://github.com/llvm/llvm-project/commit/182b72aa486f618907c2bb7581a9d123738767eb
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2021-10-29 (Fri, 29 Oct 2021)

  Changed paths:
    M lld/test/wasm/pie.ll
    M lld/test/wasm/tls-non-shared-memory.s
    M lld/test/wasm/tls.s
    M lld/wasm/SyntheticSections.cpp
    M lld/wasm/SyntheticSections.h
    M lld/wasm/Writer.cpp

  Log Message:
  -----------
  [lld][WebAssembly] Generate TLS relocation code also when linking statically

Previously relocations were only generated for PIC output, but
relocations for TLS GOT entries are always needed when shared
memory is enabled, not just in PIC mode.

This means that the `__wasm_apply_global_tls_relocs` is now
generated even for statically linked (non-PIC) output.  Without
this the globals that hold the addresses of TLS symbols are
not set correctly.

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




More information about the All-commits mailing list