[all-commits] [llvm/llvm-project] 701fa0: [lld][WebAssembly] Fix malformed output with -pie ...

Sam Clegg via All-commits all-commits at lists.llvm.org
Thu Dec 3 11:11:10 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 701fa0b5ab04e9aa309cbc30599e9d6ee879e61a
      https://github.com/llvm/llvm-project/commit/701fa0b5ab04e9aa309cbc30599e9d6ee879e61a
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2020-12-03 (Thu, 03 Dec 2020)

  Changed paths:
    M lld/test/wasm/data-segments.ll
    M lld/wasm/MarkLive.cpp
    M lld/wasm/OutputSections.cpp
    M lld/wasm/Writer.cpp

  Log Message:
  -----------
  [lld][WebAssembly] Fix malformed output with -pie + --shared-memory

The conditional guarding createInitMemoryFunction was incorrect and
didn't match that guarding the creation of the associated symbol.

Rather that reproduce the same conditions in multiple places we can
simply use the presence of the associated symbol.

Also, add an assertion that would have caught this bug.

Also, add a new test for this flag combination.

This is part of an ongoing effort to enable dynamic linking with
threads in emscripten.

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

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




More information about the All-commits mailing list