[lld][WebAssembly] Avoid importing/exporting hidden symbols in shared libraries
authorSam Clegg <sbc@chromium.org>
Thu, 26 May 2022 17:32:04 +0000 (10:32 -0700)
committerSam Clegg <sbc@chromium.org>
Thu, 26 May 2022 20:43:25 +0000 (13:43 -0700)
commit198815e18dad31a9ff0f6c1b30f356db2fefe300
tree4f0a23ec5f685ecd18bd919cb95328ee72c49d91
parent5221875a957da927a889a705276d4e073ff737b1
[lld][WebAssembly] Avoid importing/exporting hidden symbols in shared libraries

We have some special handling for weakly defined symbols where we both
import and export them, but this is not needed for hidden symbols which
should never be imported or exported.

See https://github.com/emscripten-core/emscripten/pull/16972

This should also help with:
https://github.com/emscripten-core/emscripten/issues/15487

Differential Revision: https://reviews.llvm.org/D126491
lld/test/wasm/shared-weak-symbols.s
lld/wasm/Symbols.cpp
lld/wasm/Writer.cpp