mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 02:26:05 +00:00

The rule here, which I'm copying from the ELF linker, is that shared library symbols should take presence, unless the symbol has already be extracted from the archive. e.g: ``` $ wasm-ld foo.a foo.so ref.o // .so wins $ wasm-ld foo.a ref.o foo.so // .a wins ``` In the first case the shared library takes precedence because the lazy symbol is replaced by the .so symbol before it is extracted from the archive. In the second example the ref.o file causes the archive to be exracted before the .so file is processed, so in that case the archive file wins. Fixes: https://github.com/emscripten-core/emscripten/issues/23501