[all-commits] [llvm/llvm-project] 1c1fbf: [lld][WebAssembly] Fix TLS-relative relocations wh...

Sam Clegg via All-commits all-commits at lists.llvm.org
Tue Nov 19 14:01:00 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1c1fbf51b5ec9657e5da7fa94ee892273255544a
      https://github.com/llvm/llvm-project/commit/1c1fbf51b5ec9657e5da7fa94ee892273255544a
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2024-11-19 (Tue, 19 Nov 2024)

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

  Log Message:
  -----------
  [lld][WebAssembly] Fix TLS-relative relocations when linking without shared memory (#116136)

TLS-relative relocations always need to be relative the TLS section
since they get added to `__tls_base` at runtime.

Without this change the tls base address was effectively being added to
the final value twice in this case.

This only effects code the is built with `-pthread` but linked without
shared memory (i.e. without threads).

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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list