[all-commits] [llvm/llvm-project] 53217e: [lld][WebAssembly] Don't apply data relocations at...

Sam Clegg via All-commits all-commits at lists.llvm.org
Mon Jun 27 15:50:38 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 53217ecb882c25bb69e6065512a0627828d6e870
      https://github.com/llvm/llvm-project/commit/53217ecb882c25bb69e6065512a0627828d6e870
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2022-06-27 (Mon, 27 Jun 2022)

  Changed paths:
    M lld/test/wasm/data-segments.ll
    M lld/test/wasm/pie.ll
    M lld/test/wasm/shared-weak-symbols.s
    M lld/test/wasm/shared.s
    M lld/test/wasm/shared64.s
    M lld/test/wasm/tls-export.s
    M lld/test/wasm/tls-non-shared-memory.s
    M lld/wasm/Driver.cpp
    M lld/wasm/Writer.cpp

  Log Message:
  -----------
  [lld][WebAssembly] Don't apply data relocations at static constructor time

Instead, export `__wasm_apply_data_relocs` and `__wasm_call_ctors`
separately.

This is required since user code in a shared library (such as static
constructors) should not be run until relocations have been applied to
all loaded libraries.

See: https://github.com/emscripten-core/emscripten/issues/17295

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




More information about the All-commits mailing list