[all-commits] [llvm/llvm-project] b34ec5: [lld][WebAssembly] Handle weakly referenced symbol...

Sam Clegg via All-commits all-commits at lists.llvm.org
Mon Aug 10 08:17:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b34ec5969f1ad27f48ebc0d35a3fe37e810a8a32
      https://github.com/llvm/llvm-project/commit/b34ec5969f1ad27f48ebc0d35a3fe37e810a8a32
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M lld/test/wasm/archive-weak-undefined.ll
    M lld/wasm/SymbolTable.cpp
    M lld/wasm/Symbols.cpp
    M lld/wasm/Symbols.h

  Log Message:
  -----------
  [lld][WebAssembly] Handle weakly referenced symbols when lazy (archive) version is see first

When a weak reference of a lazy symbol occurs we were not correctly
updating the lazy symbol.  We need to tag the existing lazy symbol
as weak and, in the case of a function symbol, give it a signature.

Without the signature we can't then create the dummy function which
is needed when an weakly undefined function is called.

We had tests for weakly referenced lazy symbols but we were only
tests in the case where the reference was seen before the lazy
symbol.

See: https://github.com/WebAssembly/wasi-libc/pull/214

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




More information about the All-commits mailing list