wabt
wabt copied to clipboard
unable to read u32 leb128
enviroment
- windows with release 1.0.23
- placed the Dynlib.dll and the wasm2c file with same directory
- kali is the same
command && report
.\wasm2c.exe easywasm.wasm -o ret.c 0000018: error: unable to read u32 leb128: needed_dynlibs
I assume that easywasm.wasm is built using emscirten's SIDE_MODULE or MAIN_MODULE commands?
The format of the dylink section using in emscripten (the output of wasm-ld -shared and wasm-ld -pie) changed to add list of needed dyligs to the dylink section. I imagine that easywasm.wasm was built with a slightly older version of emscripten or llvm? Can you confirm that? Can you try re-building with a newer version? Technically we should just ignore errors like this since dylink is a custom section....
BTW if you using emscripten's SIDE_MODULE to try to build a portable wasm file you probably want to switch to using the STANDALONE_WASM option which was designed for this purpose.
Closing as dormant/unresponded-to.