LinuxCommandLibrary

wasm-objdump

Display WebAssembly binary file information

TLDR

Show all information

$ wasm-objdump [file.wasm]
copy
Display headers only
$ wasm-objdump -h [file.wasm]
copy
Disassemble function bodies
$ wasm-objdump -d [file.wasm]
copy
Show section details
$ wasm-objdump -x [file.wasm]
copy
Show raw section contents
$ wasm-objdump -s [file.wasm]
copy
Examine specific section
$ wasm-objdump -j [Code] [file.wasm]
copy
Show relocations with disassembly
$ wasm-objdump -d -r [file.wasm]
copy

SYNOPSIS

wasm-objdump [options] file

DESCRIPTION

wasm-objdump displays information about WebAssembly binary (.wasm) files. It's part of WABT (WebAssembly Binary Toolkit) and functions similarly to objdump for native binaries.
The tool inspects module structure including imports, exports, functions, globals, memory layout, and WebAssembly bytecode instructions. It's essential for debugging, reverse engineering, and understanding compiled WebAssembly output.
Use cases include performance analysis, security audits, and verifying compiler output. The disassembly mode shows WebAssembly instructions with function boundaries.

PARAMETERS

-h, --headers

Print section headers.
-d, --disassemble
Disassemble function bodies.
-x, --details
Show section details.
-s, --full-contents
Print raw section contents.
-j, --section name
Select specific section.
-r, --reloc
Show relocations with disassembly.
--debug
Print debug information.
--section-offsets
Show section offsets in disassembly.
--help
Display help.
--version
Display version.

CAVEATS

Only works with WebAssembly binaries, not native executables. Large modules may produce verbose output. Part of WABT package.

HISTORY

wasm-objdump is part of WABT, the WebAssembly Binary Toolkit developed by the WebAssembly Community Group. WABT provides essential tools for working with the WebAssembly format, enabling developers to inspect and manipulate .wasm files.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community