← 返回命令列表

Linux command

objdump 命令

文本

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

常用示例

Disassemble executable

objdump -d [binary]

Show all headers

objdump -x [binary]

Show section contents

objdump -s [binary]

Disassemble with source

objdump -S [binary]

Show symbol table

objdump -t [binary]

Show dynamic symbols

objdump -T [binary]

Disassemble specific section

objdump -d -j [.text] [binary]

Disassemble with Intel syntax

objdump -d -M intel [binary]

Disassemble with demangled C++ symbols

objdump -d -C [binary]

Show file header

objdump -f [binary]

Show relocation entries

objdump -r [binary]

说明

objdump displays information about object files. It can disassemble executables, show headers, symbol tables, and relocations. It is essential for binary analysis, debugging, and reverse engineering. The tool works with ELF, PE/COFF, Mach-O, and other object file formats supported by the BFD library. On x86, disassembly defaults to AT&T syntax; use -M intel for Intel syntax. The -S option interleaves source code with disassembly when debug info is present, making it valuable for understanding compiler output.

参数

-d, --disassemble
Disassemble code sections.
-D
Disassemble all sections.
-S, --source
Mix source with disassembly.
-t, --syms
Symbol table.
-T, --dynamic-syms
Dynamic symbol table.
-x, --all-headers
All headers.
-h, --section-headers
Section headers.
-r, --reloc
Relocation entries.
-j _section_
Specific section only.
-M _options_
Disassembler options.
-C, --demangle
Demangle C++ symbols.
-s, --full-contents
Display full contents of all sections.
-f, --file-headers
Display file header information.
-l, --line-numbers
Include source file and line numbers in disassembly (requires debug info).
-w, --wide
Format output for more than 80 columns.
--no-show-raw-insn
Don't show raw instruction bytes alongside disassembly.
-D, --disassemble-all
Disassemble all sections, not just text.
--disassembler-color _mode_
Enable colored disassembly output (off, terminal, on, extended).
--visualize-jumps
Draw ASCII art arrows showing jump targets in disassembly.
-e, --debugging-tags
Display debugging information in a format compatible with ctags.

FAQ

What is the objdump command used for?

objdump displays information about object files. It can disassemble executables, show headers, symbol tables, and relocations. It is essential for binary analysis, debugging, and reverse engineering. The tool works with ELF, PE/COFF, Mach-O, and other object file formats supported by the BFD library. On x86, disassembly defaults to AT&T syntax; use -M intel for Intel syntax. The -S option interleaves source code with disassembly when debug info is present, making it valuable for understanding compiler output.

How do I run a basic objdump example?

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

What does -d, --disassemble do in objdump?

Disassemble code sections.