← 返回命令列表

Linux command

wasm-objdump 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Show all information

wasm-objdump [file.wasm]

Display headers only

wasm-objdump -h [file.wasm]

Disassemble function bodies

wasm-objdump -d [file.wasm]

Show section details

wasm-objdump -x [file.wasm]

Show raw section contents

wasm-objdump -s [file.wasm]

Examine specific section

wasm-objdump -j [Code] [file.wasm]

Show relocations with disassembly

wasm-objdump -d -r [file.wasm]

说明

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.

参数

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

FAQ

What is the wasm-objdump command used for?

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.

How do I run a basic wasm-objdump example?

Run `wasm-objdump [file.wasm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -h, --headers do in wasm-objdump?

Print section headers.