[WebAssembly] Model weakly defined symbols as wasm exports
authorSam Clegg <sbc@chromium.org>
Tue, 26 Sep 2017 21:10:09 +0000 (21:10 +0000)
committerSam Clegg <sbc@chromium.org>
Tue, 26 Sep 2017 21:10:09 +0000 (21:10 +0000)
commitba9fa9fd168f3cb74be749c77df73ada3ee0c27d
tree13f0adbe8e1b4991133dfaaa4fbfc2e346abd77f
parente22ebeab1a98a8c3e8b36ba56cd0d1a1dd433dc7
[WebAssembly] Model weakly defined symbols as wasm exports

Previously these were being included as both imports and
exports, with the import being satisfied by the export
(or some strong symbol) at runtime.  However proved
unnecessary and actually complicated linking as it meant
there was not a 1-to-1 mapping between a wasm function
/global index and a linker symbol.

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

llvm-svn: 314245
llvm/lib/MC/WasmObjectWriter.cpp
llvm/lib/Object/WasmObjectFile.cpp
llvm/test/MC/WebAssembly/weak-alias.ll