You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 and pic flags.
❯ wasm-bindgen --out-dir patch --target web libsimple-web-example-fullstack-patch-1745952796957.wasm
error: invalid offset for segment of function table Global(Id { idx: 2 })
The ifunc table is initialized to a global because it is relocated at runtime.
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:
Uh oh!
There was an error while loading. Please reload this page.
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: