-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasm-ld regression in 3.1.64: symbol type mismatch #23501
Comments
I did some bisection, and this change looks related: llvm/llvm-project#75242 (cc: @sbc100) It seems to add two new checks:
We (Pyodide) faced new signature mismatches in a few packages, and I think it is what the PR intended.
This seems to be a secondary change in the PR, but it's the thing causing this issue. Happens here: https://github.com/sbc100/llvm-project/blob/000519d1a3597cfb7e42b23a33f0989ad3ef1e4b/lld/wasm/SymbolTable.cpp#L370-L374 But I don't understand why it is misjudging a |
@ryanking13 are you also seeing mismatched between |
Sorry I misread the OP, this is indeed related to shared symbols. |
Fix in flight on the llvm side: llvm/llvm-project#124619 |
Thanks for the quick answer and fix! |
…acing lazy symbols (#124619) 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: emscripten-core/emscripten#23501
In Emscripten 3.1.64, we start getting errors in building several libraries like follows:
Here's what wasm-ld outputs as the
--repro
:a.tar.gz
wasm-ld @response.txt
works fine withwasm-ld
3.1.63 but breaks on 3.1.64.Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.64 (a1fe390)
The text was updated successfully, but these errors were encountered: