Compatibility with --pie
and --experimental-pic
wasm-ld flag
#4493
Labels
--pie
and --experimental-pic
wasm-ld flag
#4493
Motivation
I've implemented WASM hot patching for Rust.
DioxusLabs/dioxus#3797 (comment)
432065352-b81f1a60-b6b2-422d-a536-d9e0bcd75221.mp4
I'd like to fixup the generated patches by running the various transforms (externref being the pricky set) but wasm-bindgen simply refuses to run with WASM linked with the wasm-ld
pie
andpic
flags.The ifunc table is initialized to a global because it is relocated at runtime.
https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md
For references this is the set of linker args I'm passing to wasm-ld:
Proposed Solution
wasm-bindgen should be able to work with relocatable ifunc tables.
Alternatives
I can work around this somewhat (using --table-base and --global-base flags and skipping PIE/PIC) but the tooling shouldn't just give up when it sees PIC/PIE code.
The text was updated successfully, but these errors were encountered: