ar : 创建静态库,插入,删除,列出和提取成员
strings : 列出文件中的所有可打印字符串
strip : 从目标文件中删除符号表信息
nm : 列出目标文件中符号表中定义的符号
size : 列出目标文件中节的名字和大小
ldd
列出可执行文件和动态库所依赖的动态库信息。
DESCRIPTION
ldd prints the shared libraries required by each program or shared library specified on the command line.
readelf
列出ELF格式文件的信息。readelf 后面必须跟参数,参数控制要显示的内容。readelf功能与objdump相似,且其不依赖BFD库。
ELF文件的格式参考http://vaqeteart.iteye.com/blog/1118753
DESCRIPTION
readelf displays information about one or more ELF format object files. The options control what particular information to display.
elffile... are the object files to be examined. 32-bit and 64-bit ELF files are supported, as are archives containing ELF files.
This program performs a similar function to objdump but it goes into more detail and it exists independently of the BFD library, so
if there is a bug in BFD then readelf will not be affected.
options (我常用的options做了中文解释,信息很多没有看懂几个,哈哈!!)
SYNOPSIS
readelf [-a|--all]
[-h|--file-header]
[-l|--program-headers|--segments]
[-S|--section-headers|--sections]
[-g|--section-groups]
[-t|--section-details]
[-e|--headers]
[-s|--syms|--symbols] ------------ 文件的符号
[-n|--notes]
[-r|--relocs]
[-u|--unwind]
[-d|--dynamic] ------------ 文件依赖的动态库信息
[-V|--version-info]
[-A|--arch-specific]
[-D|--use-dynamic]
[-x |--hex-dump=]
[-p |--string-dump=]
[-R |--relocated-dump=]
[-c|--archive-index]
[-w[lLiaprmfFsoR]|
--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]]
[-I|-histogram]
[-v|--version]
[-W|--wide]
[-H|--help]
objdump 与readelf功能相似。objdump : 所有二进制工具之母。能够显示一个目标文件中的所有信息,它最有用的功能是反汇编.text节中的二进制指令
DESCRIPTION
objdump displays information about one or more object files. The options control what particular information to display. This
information is mostly useful to programmers who are working on the compilation tools, as opposed to programmers who just want their
program to compile and work.
objfile... are the object files to be examined. When you specify archives, objdump shows information on each of the member object
files.
SYNOPSIS
objdump [-a|--archive-headers]
[-b bfdname|--target=bfdname]
[-C|--demangle[=style] ]
[-d|--disassemble]
[-D|--disassemble-all]
[-z|--disassemble-zeroes]
[-EB|-EL|--endian={big | little }]
[-f|--file-headers]
[-F|--file-offsets]
[--file-start-context]
[-g|--debugging]
[-e|--debugging-tags]
[-h|--section-headers|--headers]
[-i|--info]
[-j section|--section=section] --------------------- 指定某段信息
[-l|--line-numbers]
[-S|--source]
[-m machine|--architecture=machine]
[-M options|--disassembler-options=options]
[-p|--private-headers]
[-r|--reloc]
[-R|--dynamic-reloc]
[-s|--full-contents]
[-W[lLiaprmfFsoR]|
--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]]
[-G|--stabs]
[-t|--syms] ---------------------- 符号信息
[-T|--dynamic-syms]
[-x|--all-headers]
[-w|--wide]
[--stop-address=address]
[--start-address=address]
[--prefix-addresses]
[--[no-]show-raw-insn]
[--adjust-vma=offset]
[--special-syms]
[--prefix=prefix]
[--prefix-strip=level]
[--insn-width=width]
[-V|--version]
[-H|--help]
objfile...
常用选项:
反汇编
# objdump -j .text -S objfile
原文网址:
http://m.blog.csdn.net/article/details?id=6862787