[lld][WebAssembly] Handle mixed strong and weak undefined symbols
authorSam Clegg <sbc@chromium.org>
Fri, 28 Feb 2020 01:32:22 +0000 (17:32 -0800)
committerSam Clegg <sbc@chromium.org>
Fri, 28 Feb 2020 18:16:10 +0000 (10:16 -0800)
commita57f1a543570fbccfa44c38909bc66b66e9f1c2f
treec375c437c1fc4c0356de7d2a1c903e60d269d485
parentf16d2bec40691f4050174c99600847d024486bc5
[lld][WebAssembly] Handle mixed strong and weak undefined symbols

When there are both strong and weak references to an undefined
symbol ensure that the strong reference prevails in the output symbol
generating the correct error.

Test case copied from lld/test/ELF/weak-and-strong-undef.s

Differential Revision: https://reviews.llvm.org/D75322
lld/test/wasm/Inputs/weak-undefined.s [new file with mode: 0644]
lld/test/wasm/weak-and-strong-undef.s [new file with mode: 0644]
lld/wasm/SymbolTable.cpp
lld/wasm/Symbols.h
lld/wasm/SyntheticSections.cpp