objdump -H 顯示如下:
一般常用的是
objdump -x 顯示文件頭信息
objdump -d 反匯編代碼段代碼
objdump -D 反匯編所有代碼
用法:objdump <選項> <文件> 顯示來自目標 <文件> 的信息。 至少必須給出以下選項之一: -a, --archive-headers Display archive header information -f, --file-headers Display the contents of the overall file header -p, --private-headers Display object format specific file header contents -P, --private=OPT,OPT... Display object format specific contents -h, --[section-]headers Display the contents of the section headers -x, --all-headers Display the contents of all headers 顯示頭信息 -d, --disassemble Display assembler contents of executable sections 顯示代碼段代碼 -D, --disassemble-all Display assembler contents of all sections 顯示所有段代碼 -S, --source Intermix source code with disassembly -s, --full-contents Display the full contents of all sections requested -g, --debugging Display debug information in object file -e, --debugging-tags Display debug information using ctags style -G, --stabs Display (in raw form) any STABS info in the file -W[lLiaprmfFsoRt] or --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames, =frames-interp,=str,=loc,=Ranges,=pubtypes, =gdb_index,=trace_info,=trace_abbrev,=trace_aranges, =addr,=cu_index] Display DWARF info in the file -t, --syms Display the contents of the symbol table(s) -T, --dynamic-syms Display the contents of the dynamic symbol table -r, --reloc Display the relocation entries in the file -R, --dynamic-reloc Display the dynamic relocation entries in the file @<file> Read options from <file> -v, --version Display this program's version number -i, --info List object formats and architectures supported -H, --help Display this information 以下選項是可選的: -b, --target=BFDNAME 將標的目標文件格式指定為 BFDNAME -m, --architecture=MACHINE 將標的體系結構指定為 MACHINE -j, --section=NAME 只顯示 NAME 節的信息 -M, --disassembler-options=OPT 將文本傳遞到 OPT 反匯編程序 -EB --endian=big 反匯編時假定高位字節在前 -EL --endian=little 反匯編時假定低位字節在前 --file-start-context 從文件的起點引入上下文 (帶有 -S) -l, --line-numbers 在輸出中給出行號和文件名 -C, --demangle[=STYLE] 對修飾過的 (mangled) 符號名進行解碼 如果給出了 STYLE,STYLE 可能為“auto”、“gnu”、 “lucid”、“arm”、“hp”、“edg”或“gnu-new-abi” -w, --wide 以多於 80 列的寬度對輸出進行格式化 -z, --disassemble-zeroes 反匯編時不要跳過為零的塊 --start-address=ADDR 只有進程數據的地址 >= ADDR --stop-address=ADDR 只有進程數據的地址 <= ADDR --prefix-addresses 同反匯編代碼並列顯示完整的地址 --[no-]show-raw-insn 同符號反匯編並列顯示十六進制值 --adjust-vma=OFFSET 為所有顯示的節地址增加 OFFSET --dwarf-depth=N Do not display DIEs at depth N or greater --dwarf-start=N Display DIEs starting with N, at the same depth or deeper --dwarf-check Make additional dwarf internal consistency checks. objdump:支持的目標: elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex objdump:支持的體系結構: i386 i386:x86-64 i386:x64-32 i8086 i386:intel i386:x86-64:intel i386:x64-32:intel i386:nacl i386:x86-64:nacl i386:x64-32:nacl iamcu iamcu:intel l1om l1om:intel k1om k1om:intel plugin 下列 i386/x86-64 特定的反匯編器選項在使用 -M 開關時可用(使用逗號分隔多個選項): x86-64 Disassemble in 64bit mode i386 Disassemble in 32bit mode i8086 在 16 位模式下反匯編 att 用 AT&T 語法顯示指令 intel 用 Intel 語法顯示指令 att-mnemonic Display instruction in AT&T mnemonic intel-mnemonic Display instruction in Intel mnemonic addr64 假定 64 位地址大小 addr32 假定 32 位地址大小 addr16 假定 16 位地址大小 data32 假定 32 位數據大小 data16 假定 16 位數據大小 suffix 在 AT&T 語法中始終顯示指令后綴 amd64 Display instruction in AMD64 ISA intel64 Display instruction in Intel64 ISA