01-disasm-wat.sh (714B)
1 # Golden: objdump inspection of a wasm core module. The fixture add.wasm is a 2 # committed kit-produced module (two exported functions, add1/madd) so the 3 # goldens are stable against codegen drift. Exercises the wasm object reader 4 # (-h section list, -t function symbols) and the wasm disassembler (-d, which 5 # renders the code section as WAT with per-function labels and locals). 6 # Copy the fixture into the sandbox cwd and inspect it by bare name so the 7 # golden's "file format" banner path is stable regardless of repo location. 8 cp "$(dirname "$0")/add.wasm" add.wasm 9 echo "== sections ==" 10 "$KIT" objdump -h add.wasm 11 echo "== symbols ==" 12 "$KIT" objdump -t add.wasm 13 echo "== disasm ==" 14 "$KIT" objdump -d add.wasm