Dumps information about sections in a WebAssembly file
Usage: wasm-tools objdump [OPTIONS] [INPUT]
Arguments:
[INPUT] Input file to process
Options:
-o, --output <OUTPUT> Where to place output
-v, --verbose... Use verbose output (-v info, -vv debug, -vvv trace)
--color <COLOR> Configuration over whether terminal colors are used in
output [default: auto]
-h, --help Print help (see more with '--help')
Examples:
# Dump the contents of the file `add.wasm`:
$ wasm-tools objdump add.wasm
types | 0xa - 0x11 |
7 bytes | 1 count
functions | 0x13 - 0x15 |
2 bytes | 1 count
exports | 0x17 - 0x33 |
28 bytes | 1 count
code | 0x35 - 0x3e |
9 bytes | 1 count
custom "name" | 0x45 - 0x5c |
23 bytes | 1 count
One line is printed per section. The columns indicate:
* The name of the section (for example, "types")
* The offsets within the file for the start and end of the section (for
example, "0xa - 0x11")
* The size of the section (for example, "7 bytes")
* The number of items within the section (for example, "1 count")
# Dump the contents of the file `add.wasm` and store the text-based
output in a file
# named `add.txt`:
$ wasm-tools objdump add.wasm -o add.txt
Exit status:
0 if OK,
nonzero to indicate a parse error.