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 would suggest trying to guess an address for exported globals in Wasm instead of always using 0.
At least in Rust, it looks like symbols are exported globals of type i32 which value is the address (in linear memory) of the symbol. For example, an empty wasm module in Rust looks like:
Notice how __data_end and __heap_base are exported globals of type i32 with a value in linear memory (after the initial stack pointer).
My suggestion would be to detect those cases and fill the symbol address with the global value instead of 0. I wrote a draft PR in case the idea is not rejected.
The text was updated successfully, but these errors were encountered:
I would suggest trying to guess an address for exported globals in Wasm instead of always using 0.
At least in Rust, it looks like symbols are exported globals of type i32 which value is the address (in linear memory) of the symbol. For example, an empty wasm module in Rust looks like:
Notice how
__data_end
and__heap_base
are exported globals of type i32 with a value in linear memory (after the initial stack pointer).My suggestion would be to detect those cases and fill the symbol address with the global value instead of 0. I wrote a draft PR in case the idea is not rejected.
The text was updated successfully, but these errors were encountered: