[all-commits] [llvm/llvm-project] a5cd5d: [lld][WebAssembly] Avoid emitting empty __wasm_app...

YAMAMOTO Takashi via All-commits all-commits at lists.llvm.org
Mon Sep 30 17:18:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a5cd5d351ddb164d7bb5e6c5e20b2b6519d793f1
      https://github.com/llvm/llvm-project/commit/a5cd5d351ddb164d7bb5e6c5e20b2b6519d793f1
  Author: YAMAMOTO Takashi <yamamoto at midokura.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

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

  Log Message:
  -----------
  [lld][WebAssembly] Avoid emitting empty __wasm_apply_data_relocs function (#109249)

Instead of always generating __wasm_apply_data_relocs when relevant
options like -pie and -shared are specified, generate it only when the
relevant relocations are actually necessary.

Note: omitting empty __wasm_apply_data_relocs is not a problem because
the export is optional in the spec (DynamicLinking.md) and all runtime
linker implementations I'm aware of implement it that way. (emscripten,
toywasm, wasm-tools)

Motivations:

* This possibly reduces the module size

* This is also a preparation to fix
https://github.com/llvm/llvm-project/issues/107387, for which it isn't
obvious if we need these relocations at the time of
createSyntheticSymbols. (unless we introduce a new explicit option like
--non-pie-dynamic-link.)



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