wabt icon indicating copy to clipboard operation
wabt copied to clipboard

unable to read u32 leb128

Open PoilZero opened this issue 4 years ago • 2 comments
trafficstars

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

PoilZero avatar May 01 '21 12:05 PoilZero

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....

sbc100 avatar May 02 '21 18:05 sbc100

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.

sbc100 avatar May 02 '21 18:05 sbc100

Closing as dormant/unresponded-to.

keithw avatar Feb 13 '23 10:02 keithw