-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Linking dynamic WebAssembly module fails with missing symbols #155173
Copy link
Copy link
Open
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
With this Cargo.toml:
And this command:
I expected to see this happen: Code produces a WASM module with no errors
Instead, this happened: Code fails to link:
Meta
rustc --version --verbose:For context: I'm building a dynamic WASM module with
-Clink-args=--pie -Crelocation-model=pic, but the latter flag doesn't affect whether it errors or not. On a semi-related note, I do feel like some of the flags (namely--stack-sizeand--stack-first) shouldn't be there as the__stack_pointerisn't controlled by the module anyways.If it helps narrow anything down, the
nightly-2026-04-01toolchain builds fine.