Linux下的objdump反汇编工具

1.  [wzb@embedded controller1]$ objdump --help
 Usage: objdump <option(s)> <file(s)>
 Display information from object <file(s)>.
 At least one of the following switches must be given:
  -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
  -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, --dwarf              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


 The following switches are optional:
  -b, --target=BFDNAME           Specify the target object format as BFDNAME
  -m, --architecture=MACHINE     Specify the target architecture as MACHINE
  -j, --section=NAME             Only display information for section NAME
  -M, --disassembler-options=OPT Pass text OPT on to the disassembler
  -EB --endian=big               Assume big endian format when disassembling
  -EL --endian=little            Assume little endian format when disassembling
      --file-start-context       Include context from start of file (with -S)
  -I, --include=DIR              Add DIR to search list for source files
  -l, --line-numbers             Include line numbers and filenames in output
  -C, --demangle[=STYLE]         Decode mangled/processed symbol names
                                  The STYLE, if specified, can be `auto', `gnu',
                                  `lucid', `arm', `hp', `edg', `gnu-v3', `java'
                                  or `gnat'
  -w, --wide                     Format output for more than 80 columns
  -z, --disassemble-zeroes       Do not skip blocks of zeroes when disassembling
      --start-address=ADDR       Only process data whose address is >= ADDR
      --stop-address=ADDR        Only process data whose address is <= ADDR
      --prefix-addresses         Print complete address alongside disassembly
      --[no-]show-raw-insn       Display hex alongside symbolic disassembly
      --adjust-vma=OFFSET        Add OFFSET to all displayed section addresses
      --special-syms             Include special symbols in symbol dumps


objdump: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32 elf64-little elf64-big elf32-little elf32-big srec symbolsrec tekhex binary ihex
objdump: supported architectures: i386 i386:x86-64 i8086 i386:intel i386:x86-64:intel
Report bugs to <URL:http://www.sourceware.org/bugzilla/> and hjl@lucon.org.






[wzb@embedded controller1]$ objdump --help
 Usage: objdump <option(s)> <file(s)>
 用法: objdump <选项>    <反汇编的文件列表>


 Display information from object <file(s)>.
 功能:显示来自目标文件<files>中的信息。


 At least one of the following switches must be given:
 至少给出下面的一个选项开关:


  -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 
  显示 目标格式说明的文件的头的内容。


  -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
                           显示ctag风格的调试信息。


  -G, --stabs              Display (in raw form) any STABS info in the file
                           (以原始的格式)显示文件中任何 STABS。


  -W, --dwarf              Display DWARF info in the file
                           显示文件中 DWARF信息。


  -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>
                           从file 中读取选项。


  -v, --version            Display this program's version number
                           显示 objdump程序的版本号(vsersion number :vn)。


  -i, --info               List object formats and architectures supported
                           列出objdump所支持的 目标格式,和体系结构。


  -H, --help               Display this information
  显示这个帮助信息。


 The following switches are optional: //下面的开关选项是可选的


  -b, --target=BFDNAME           Specify the target object format as BFDNAME
                                 用BFDNAME 指出目标文件的格式。


  -m, --architecture=MACHINE     Specify the target architecture as MACHINE
                                 用MACHINE指出目标文件的体系架构。


  -j, --section=NAME             Only display information for section NAME
                                 只显示段名为NAME的段的信息。


  -M, --disassembler-options=OPT Pass text OPT on to the disassembler
                                 将文本 OPT 传递给反汇编器。


  -EB --endian=big               Assume big endian format when disassembling
                                 以大端模式进行反汇编。


  -EL --endian=little            Assume little endian format when disassembling
                                 以小段模式进行反汇编。


      --file-start-context       Include context from start of file (with -S)
                                 包含文件的开始内容。
                                  
  -I, --include=DIR              Add DIR to search list for source files
                                 在源文件的搜索表中添加 DIR。


  -l, --line-numbers             Include line numbers and filenames in output
在输出中包含源文件名和行号。
                       
  -C, --demangle[=STYLE]         Decode mangled/processed symbol names
                                 The STYLE, if specified, can be `auto', `gnu',
                                  `lucid', `arm', `hp', `edg', `gnu-v3', `java'
                                  or `gnat'
解码校正过的/处理过的符号名。 STYLE 可以指派为 atuo, gnu
                                 lucid, arm, hp, edg, gnu-v3, java, 或者 gnat.


  -w, --wide                     Format output for more than 80 columns
                                 格式化行输出大于80列的输出。


  -z, --disassemble-zeroes       Do not skip blocks of zeroes when disassembling
        反汇编时, 不跳过全0的段。


      --start-address=ADDR       Only process data whose address is >= ADDR
                                 仅当地址不小于ADDR时,开始处理数据。或者说从ADDR开始处理数据。
      --stop-address=ADDR        Only process data whose address is <= ADDR
                                 仅处理地址不大于ADDR的数据。或者说到地址为ADDR时,结束数据处理。


      --prefix-addresses         Print complete address alongside disassembly
                                 与反汇编指令一起,打印完整的地址。


      --[no-]show-raw-insn       Display hex alongside symbolic disassembly
                                 与反汇编指令一起显示十六进制格式的指令。


      --adjust-vma=OFFSET        Add OFFSET to all displayed section addresses
                                 将所有要显示的段的段地址加上OFFSET。
 
      --special-syms             Include special symbols in symbol dumps
                                 在符号表转储时,包括特殊的符号。




objdump: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32 elf64-little 
                            elf64-big elf32-little elf32-big srec symbolsrec tekhex binary ihex


objdump: 支持的目标文件格式:elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32 elf64-little 
                            elf64-big elf32-little elf32-big srec symbolsrec tekhex binary ihex
 
objdump: supported architectures: i386 i386:x86-64 i8086 i386:intel i386:x86-64:intel
objdump:支持的体系结构:i386 i386:x86-64 i8086 i386:intel i386:x86-64:intel
  

Report bugs to <URL:http://www.sourceware.org/bugzilla/> and hjl@lucon.org.




OBJDUMP(1)                   GNU Development Tools                  OBJDUMP(1)    
objdump     GNU开发工具  objdump


NAME 
       objdump - display information from object files.
       objdump - 显示来自目标文件中信息。


//用法概要
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]
               [--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│--dwarf]
               [-G│--stabs]
               [-t│--syms]
               [-T│--dynamic-syms]
               [-x│--all-headers]
               [-w│--wide]
               [--start-address=address]
               [--stop-address=address]
               [--prefix-addresses]
               [--[no-]show-raw-insn]
               [--adjust-vma=offset]
               [--special-syms]
               [-V│--version]
               [-H│--help]
               objfile...


DESCRIPTION // 功能描述
       objdump  displays  information  about  one  or  more object files.  The
       options control what particular information to display.  This  informa-
       tion 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.


objdump 显示关于一个或多个目标文件(object file)的信息。选项控制指定的信息的显示。
这些信息对专注于编译工具的程序员非常有用,对于那些只想让程序编译并运行的程序员来说没有几乎没有什么帮助。


objfile ... 指的是要验证检查的目标文件(object file)的列表。当你指派了一个归档包,objdump 显示包中每一个
目标文件的相关信息。
   


OPTIONS // 选项
       The  long  and  short forms of options, shown here as alternatives, are
       equivalent.     At least one option from the list 
      -a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-r,-R,-s,-S,-t,-T,-V,-x must be given.
      这儿显示的供选择的长格式和短格式的命令选项,是等效的。 选项列表
      -a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-r,-R,-s,-S,-t,-T,-V,-x中选项至少有一个给出。


       -a //短格式
       --archive-header //长格式
           If  any  of  the  objfile  files  are archives, display the archive
           header information (in a format similar to  ls  -l).   Besides  the
           information  you could list with ar tv, objdump -a shows the object
           file format of each archive member.
           如果目标文件列表中的有归档文件,显示归档文件的头信息(header information)
           (显示格式与 ls -l 显示的类似)。 除了显示你能够用命令 ar tv 显示的信息外,objdump -a
           能够显示归档包中每个成员的目标文件的格式。


       --adjust-vma=offset //调整虚拟内存地址
           When dumping information, first  add  offset  to  all  the  section
           addresses.   This  is useful if the section addresses do not corre-
           spond to the symbol table, which can happen when  putting  sections
           at particular addresses when using a format which can not represent
           section addresses, such as a.out.
          当转储信息时, 首先,将偏移量offset加到所有的段地址。如果段地址(section address)与符号表(symbol table)不一致时是非常有用的。
          这种不一致发生在将段放在指定的地址,即使用这样不能代表段地址的格式,如, a.out 格式。


       -b bfdname  // binary file description name 
       --target=bfdname
           Specify that the object-code format for the object  files  is  bfd-
           name.   This option may not be necessary; objdump can automatically
           recognize many formats.
           
 指派给目标文件的目标编码格式是 bfdname。这个选项可能没有什么用; objdump 能够自动地识别许多格式。


           For example, // 例如


                   objdump -b oasys -m vax -h fu.o

           displays summary information from the section headers (-h) of fu.o,
           which  is  explicitly  identified  (-m) as a VAX object file in the
           format produced by Oasys  compilers.   You  can  list  the  formats
           available with the -i option.
 例如,
              objdump -b oasys -m vax -h fu.o
          显示目标文件fu.o的段头部(-h选项的作用)的概要信息,显式地标记为(-m选项) VAX目标文件用Oasys编译器产生的格式。
          你能够通过objdump -i 列出所有可用的格式。



       -C
       --demangle[=style] //命名的矫正
           Decode  (demangle)  low-level  symbol  names into user-level names.
           Besides removing any initial underscore prepended  by  the  system,
           this  makes  C++ function names readable.  Different compilers have
           different mangling styles. The optional demangling  style  argument
           can be used to choose an appropriate demangling style for your com-
           piler.
          将low-level(低级的)符号名转化为 user-level(用户级)符号名。
 除了去除系统初始化预先追加的下划线外,还能使C++的函数名可读。 不同编译器有不同的矫正风格。
          可选的矫正风格参数用来为你的编译器选择合适的恰当的矫正风格。



       -g
       --debugging //调试信息
           Display debugging information.  This attempts  to  parse  debugging
           information stored in the file and print it out using a C like syn-
           tax.  Only certain types of debugging information have been  imple-
           mented.  Some other types are supported by readelf -w.
  显示调试信息。objdump 在这个选项下尝试解析存储在目标文件中的调试信息并使用C风格的语法将其打印。
          只有部分类型的调试信息被实现。命令readelf -w 支持其他类型的调试信息。


       -e
       --debugging-tags //调试标记
           Like  -g,  but  the information is generated in a format compatible
           with ctags tool.
         和-g选项类似,但是 产生一种与 ctags tool工具兼容的格式。 
         


       -d
       --disassemble //反汇编
           Display the assembler mnemonics for the machine  instructions  from
           objfile.   This  option  only disassembles those sections which are
           expected to contain instructions.
          显示目标文件中的机器指令的汇编助记符。-d这个选项只能反汇编那些被认为包含一些指令的段。
  -D
       --disassemble-all //全部反汇编
           Like -d, but disassemble the contents of  all  sections,  not  just
           those expected to contain instructions.
  与-d 选项类似, 但是对所有的段的内容都进行反汇编,而不仅仅是那些被认为包含某些指令的段。


       --prefix-addresses //前缀地址
           When  disassembling, print the complete address on each line.  This
           is the older disassembly format.
           当反汇编时,每行都打印完整地址。这是旧的反汇编格式。


       -EB
       -EL
       --endian={big│little} //端模式 : 大端、小端
           Specify the endianness of the object files.  This only affects dis-
           assembly.   This  can  be  useful  when disassembling a file format
           which does not describe endianness information, such as  S-records.
           指派目标文件的端模式。这只影响反汇编。这是非常有用的当反会汇编一个文件格中没有描述
 端信息的文件时, 如  S-records。


       -f
       --file-headers //文件头部
           Display  summary information from the overall header of each of the
           objfile files.
 显示来自所有目标文件的头部的信息汇总。


       --file-start-context //文件的起始内容
           Specify that when displaying  interlisted  source  code/disassembly
          (assumes  -S)  from  a file that has not yet been displayed, extend
           the context to the start of the file.
 当从一个没有被显示的文件中交叉显示 source code(源代码)/反汇编(assumes -S),可以扩展内容到文件的开始。
          
                     


       -h
       --section-headers // 段头部
       --headers
           Display summary information from the section headers of the  object
           file.
  显示目标文件的段头部的概要信息。


           File  segments may be relocated to nonstandard addresses, for exam-
           ple by using the -Ttext, -Tdata, or -Tbss options to ld.   However,
           some  object file formats, such as a.out, do not store the starting
           address of the file segments.  In  those  situations,  although  ld
           relocates the sections correctly, using objdump -h to list the file
           section headers cannot show the  correct  addresses.   Instead,  it
           shows the usual addresses, which are implicit for the target.
           文件的段可能重定位到那种非标准地址,例如, 用选项-Ttext -Tdata or -Tbss给ld。
  然而,某些目标文件格式,如 a.out,没有存储目标文件的的段起始地址。 这种情况下,尽管ld能够
 正确地重定位段, 但是使用objdump -h 列出文件的段的头部却不能显示正确的地址。相反,objdump -h
          显示那种在目标代码中隐式的通用地址。


       -H
       --help  //帮助
           Print a summary of the options to objdump and exit.
           打印objdump 的选项概要,然后退出。


       -i
       --info
           Display  a list showing all architectures and object formats avail-
           able for specification with -b or -m.
           显示对目标文件可用的给选项-b 或者-m的指派选项和所有的体系结构(architecture)的列表。


       -j name
       --section=name
           Display information only for section name.
           //只显示指定段名(name)的段的信息。


       -l  
       --line-numbers //行号
           Label the display (using debugging information) with  the  filename
           and  source line numbers corresponding to the object code or relocs
           shown.  Only useful with -d, -D, or -r.
           用与目标文件或者从定位的文件的一致的源文件文件名和源文件的行号标记显示的信息(用调试信息)。
           仅当使用选项-d -D , or -r 选项时 -l才有用。


       -m machine
       --architecture=machine //系统的体系结构
           Specify the architecture to use when  disassembling  object  files.
           This  can  be  useful  when disassembling object files which do not
           describe architecture information, such as S-records.  You can list
           the available architectures with the -i option.
           当反汇编目标文件时, 指派使用的体系结构。
           当反汇编那些没有描述体系结构信息的的目标文件,如S-records, 是非常有用的。
           你能够列出所有支持的体系结构,用选项-i。   
          


       -M options
       --disassembler-options=options
           Pass  target  specific  information to the disassembler.  Only supported on some targets.  
           If it is necessary to  specify  more  than one disassembler option 
           then multiple -M options can be used or can be placed together into a comma separated list.
           将目标的规格说明信息传给反汇编器。仅支持一些目标文件。 如果有必要指派多于一个的反汇编器选项,那么多个-M
  选项可以使用,也可以将多个选项放在一个逗号(comma)分隔的列表中。


           If the target is an ARM architecture then this switch can  be  used
           to  select  which  register  name  set is used during disassembler.
           Specifying -M reg-names-std (the default) will select the  register
           names as used in ARM’s instruction set documentation, but with reg-
           ister 13 called ’sp’, register  14  called  ’lr’  and  register  15
           called ’pc’.  Specifying -M reg-names-apcs will select the name set
           used by the ARM Procedure Call Standard, whilst specifying -M  reg-
           names-raw will just use r followed by the register number.
           如过目标架构是一个ARM体系结构,那么这个开关能够用来选择寄存器名字集被反汇编器使用。
           指派 -M reg-name-std (默认值) 将选择在ARM指令集文档中使用的寄存器的名字。但是 register 13
           称之为sp, register 14 称之为 lr,并且register 15 称为 pc。指派 -M reg-names-apcs 将选择名字集被
           ARM Procedure Call Stands。 当-M reg-names-raw, 将使用rn(n为寄存器的编号)。


           There  are  also  two  variants  on the APCS register naming scheme
           enabled by -M reg-names-atpcs and -M reg-names-special-atpcs  which
           use  the  ARM/Thumb  Procedure  Call  Standard  naming conventions.
           (Either with the normal register  names  or  the  special  register
           names).
           还有两个关于APCS寄存器的命名模式分别用-M reg-names-atpcs 和 -M reg-names-special-atpcs,
          它使用ARM/Thumb procedure Call  Standard 命名规范。要么使用正常的寄存器名字,要么使用特殊的寄存器名字。


           This  option  can  also  be used for ARM architectures to force the
           disassembler to interpret all instructions as Thumb instructions by
           using  the  switch --disassembler-options=force-thumb.  This can be
           useful when attempting to disassemble thumb code produced by  other  
           compilers.
        这个选项能够用来强制汇编器解释所有的指令解释为Thumb指令,通过开关选项 --disassembler-options=force-thumb, 
        在ARM体系结构下。当尝试反汇编器其他编译器生成的thumb code,非常有用。


           For  the  x86,  some  of  the options duplicate functions of the -m
           switch, but allow finer grained control.  Multiple selections  from
           the  following  may  be  specified  as  a  comma  separated string.
           x86-64, i386 and i8086 select disassembly for the  given  architec-
           ture.  intel and att select between intel syntax mode and AT&T syn-
           tax mode.  addr32, addr16, data32 and data16  specify  the  default
           address size and operand size.  These four options will be overrid-
           den if x86-64, i386 or i8086 appear later  in  the  option  string.
           Lastly,  suffix,  when  in AT&T mode, instructs the disassembler to
           print a mnemonic suffix even when the suffix could be  inferred  by
           the operands.
           对于x86架构, 一些选项重复了 -m 开关选项的功能,但是允许更精细的粒度控制。 多个一起的选项指派为逗号分隔的字符串。
           x86-64, i386 and i8086为指定的架构选择反汇编器。 intel 和att 选择intel语法模式和AT&T语法模式,
           addr32, addr16, data32 和data16 指派默认的地址大小和操作数大小。这四个选项将被覆盖,如果后续的选项串中出现了
           x86-64, i386 or i8086。最后, 当使用AT&T模式时,后缀将指导反汇编器打印助记符后缀,甚至当后缀被操作数干扰。


           For  PPC,  booke,  booke32  and booke64 select disassembly of BookE
           instructions.  32 and 64 select PowerPC and PowerPC64  disassembly,
           respectively.  e300 selects disassembly for the e300 family.
            对于ppc,booke, booke32 和booke64选择反汇编 Booke的指令。32,64响应地选择PowerPC
            和PowerPC64,反汇编. e300 选择e300指令集的反汇编。


           For MIPS, this option controls the printing of instruction mnemonic
           names and register names in  disassembled  instructions.   Multiple
           selections from the following may be specified as a comma separated
           string, and invalid options are ignored:
           对于MIPS, 这个选项控制指令助记符名字和寄存器名字在反汇编指令中的打印。多个选项能够被指派到一个用逗号分割的字符串。
           无效的选项被忽略。
           
           "no-aliases" //无别名
               Print the ’raw’ instruction mnemonic  instead  of  some  pseudo
               instruction  mnemonic.   I.e., print ’daddu’ or ’or’ instead of
               ’move’, ’sll’ instead of ’nop’, etc.
               打印原始(raw)的的指令助记符 而不是伪指令助记符。 例如, 打印 daddu 或者or指令 而不是
               move, 打印sll而不是 nop指令,等等。


           "gpr-names=ABI"
               Print GPR (general-purpose register) names as  appropriate  for
               the  specified ABI.  By default, GPR names are selected accord-
               ing to the ABI of the binary being disassembled.
               打印GPR(通用寄存器)的名字作为适合于指派的ABI。 默认情况下, GPR名字的选择有
                反汇编的二进制文件的ABI决定的。


           "fpr-names=ABI"
               Print FPR (floating-point register) names  as  appropriate  for
               the  specified ABI.  By default, FPR numbers are printed rather
               than names.
               打印FPR(浮点寄存器)名字作为适合于指定的ABI。 默认的情况下,打印FPR编号而不是名字。


           "cp0-names=ARCH"  
               Print CP0 (system control coprocessor; coprocessor 0)  register
               names  as  appropriate for the CPU or architecture specified by
               ARCH.  By default, CP0 register names are selected according to
               the architecture and CPU of the binary being disassembled.
              打印 CP0 (系统控制协处理器:协处理器 0)寄存器名字适合于ARCH指派的CPU或者体系结构。
              默认地情况下, CP0寄存器的名字将要反汇编的的二进制的文件的cpu和体系结构。


           "hwr-names=ARCH"
               Print  HWR (hardware register, used by the "rdhwr" instruction)
               names as appropriate for the CPU or architecture  specified  by
               ARCH.   By  default,  HWR  names  are selected according to the
               architecture and CPU of the binary being disassembled.
               打印 HWR (硬件寄存器, used by the "rdhwr" 指令)名字 适合于CPU或者被ARCH指派的体系结构。
               默认的情况下, HWR 名字根据将要反汇编的二进制文件的的cpu和体系结构来选择。


           "reg-names=ABI"
               Print GPR and FPR names as appropriate for the selected ABI.
               打印 GPR 和 FPR 的名字 并适合于所选择的ABI.


           "reg-names=ARCH"
               Print CPU-specific register names (CP0 register and HWR  names)
               as appropriate for the selected CPU or architecture.
              打印  CPU专用的寄存名字(CP0 寄存器和HWR 名字)与所选的CPU 或者体系结构相适应。


           For  any  of the options listed above, ABI or ARCH may be specified
           as numeric to have numbers  printed  rather  than  names,  for  the
           selected  types of registers.  You can list the available values of
           ABI and ARCH using the --help option.
 对于任何一个上面列出来的选项, ABI 或者 ARCH 指派为数值,对于所选的类型的寄存器,打印数字而不是名字。
          你能通过--help选项列出所有可用的ABI 和ARCH的值。


           For  VAX,  you  can  specify  function  entry  addresses  with   -M
           entry:0xf00ba.   You can use this multiple times to properly disas-
           semble VAX binary files that don’t contain symbol tables (like  ROM
           dumps).  In these cases, the function entry mask would otherwise be
           decoded as VAX instructions, which would probably lead the rest  of
           the function being wrongly disassembled.
           对于 VAX, 你能指派函数的入口地址 用选项 -M entry:0xf00BA. 你可以使用多次来反汇编那些不包含
           符号表(如rom dumps)的VAX 二进制文件。 在这些情况下, 函数入口标记否则被解码为VAX的指令,将导致函数后续的
           的部分反汇编错误。


    -p
       --private-headers
           Print  information that is specific to the object file format.  The
           exact information printed depends upon the object file format.  For
           some object file formats, no additional information is printed.
           打印指派给目标文件格式的的信息。 打印的具体信息依赖于目标文件的格式。
           对于一些目标文件格式, 没有附加的信息被打印。  


       -r
       --reloc
           Print  the  relocation entries of the file.  If used with -d or -D,
           the relocations are printed interspersed with the disassembly.
           打印文件入口的重定位信息。 如果使用了 -d 或者-D选项重定位信息将分散在反汇编中显示。


       -R
       --dynamic-reloc
           Print the dynamic relocation entries of the  file.   This  is  only
           meaningful  for  dynamic  objects,  such as certain types of shared
           libraries.
           显示文件的动态重定位入口。这只对动态的目标文件有意义,如一些类型的共享库。         


       -s
       --full-contents
           Display the full contents of any sections  requested.   By  default
           all non-empty sections are displayed.
           显示指定的任何段的全部内容。默认情况下, 显示所有的非空段。


       -S
        --source
           Display  source  code  intermixed  with  disassembly,  if possible.
           Implies -d.
           尽可能地, 将源代码混合地显示在反汇编的指令中。 意味着使用了-d选项。


       --show-raw-insn
           When disassembling instructions, print the instruction  in  hex  as
           well  as  in symbolic form.  This is the default except when --pre-
           fix-addresses is used.
           当反汇编指令时,同时以十六进制和符号的形式打印指令。 这是默认的打印方式,除非当使用了 --prefix-addresses选项。


       --no-show-raw-insn
           When disassembling  instructions,  do  not  print  the  instruction
           bytes.  This is the default when --prefix-addresses is used.
          当反汇编指令时, 不打印指令字节。 这是默认的方式,在使用了 --prefix-address.


       -W
       --dwarf
           Displays  the  contents of the DWARF debug sections in the file, if
           any are present.
          显示文件中DWARF调试段的内容,如果存在的话。 


       -G
       --stabs
           Display the full contents of any sections requested.   Display  the
           contents  of the .stab and .stab.index and .stab.excl sections from
           an ELF file.  This is only useful on systems (such as Solaris  2.0)
           in  which  ".stab" debugging symbol-table entries are carried in an
           ELF section.  In most other file  formats,  debugging  symbol-table
           entries  are  interleaved  with linkage symbols, and are visible in
           the --syms output.
          显示请求段的所有内容。在ELF文件中显示.stab .stab.index .stab.excl段的内容。
          这个选项仅对那些将 .stab 调试符号表入口装入到 ELF段的系统(如 Solaris 2.0)上有用。
          在其他的大多数文件格式中, 调试符号表入口穿插在连接符号中,可以显示在 --syms 选项下的输出。


       --start-address=address
           Start displaying data at the specified address.  This  affects  the
           output of the -d, -r and -s options.
           从指定的地址开始显示数据。 这个选项将影响到 -d, -r, 和-s选项的输出。


       --stop-address=address
           Stop  displaying  data  at the specified address.  This affects the
           output of the -d, -r and -s options.
           到指定的地址时,停止显示数据。 这个选项将影响到 -d, -r, 和-s选项的输出。  


       -t
       --syms
           Print the symbol table entries of the file.  This is similar to the
           information provided by the nm program.
          打印文件的符号表入口。这个选项的显示信息与nm程序显示的信息类似。


       -T
       --dynamic-syms
           Print  the  dynamic symbol table entries of the file.  This is only
           meaningful for dynamic objects, such as  certain  types  of  shared
           libraries.   This  is similar to the information provided by the nm
           program when given the -D (--dynamic) option.
           
           打印文件的动态符号表的入口。这个选项只对动态目标文件(如某些类型的共享库)有意义。
           这个选项的输出信息和nm程序在指定选项 -D(--dynamic)的输出类似。
           


       --special-syms
           When displaying symbols include those which the target considers to
           be  special in some way and which would not normally be of interest
           to the user.
           当显示的符号包含一些对目标文件来说子啊某些方面特殊的符合和那些在用户通常情况下不感兴趣的符合。
           


       -V
       --version
           Print the version number of objdump and exit.
          打印objdump的版本号 并退出。
        


       -x
       --all-headers
           Display all available header information, including the symbol  ta-
           ble  and  relocation entries.  Using -x is equivalent to specifying
           all of -a -f -h -p -r -t.
           显示所有的可用头信息, 包括符号表和重定位的入口。使用-x选项等效于同时指派了 
          -a,-f, -h, -p, -r, -t 。
         


       -w
       --wide
           Format some lines  for  output  devices  that  have  more  than  80
           columns.   Also  do  not  truncate  symbol names when they are dis-
           played.
           格式化那些输出设备超过80列的行。 当它们显示的时候,不截断符号名。


   -z
       --disassemble-zeroes
           Normally the disassembly output will skip blocks of  zeroes.   This
           option  directs  the disassembler to disassemble those blocks, just
           like any other data.
          正常情况下,反汇编的输出会跳过全0的块。 这个选项将指导反汇编器反汇编的这些全0的块,像
          其他的数据。


       @file
           Read command-line options from file.  The options read are inserted
           in  place of the original @file option.  If file does not exist, or
           cannot be read, then the option will be treated literally, and  not
           removed.
           从文件读取命令行选项。 读取的选项插入到原始的@file选项的位置并代替@file选项。
           如果文件不存在或者没有读权限,那么这个选项将按字面值对待,而不是去除。


           Options  in file are separated by whitespace.  A whitespace charac-
           ter may be included in an option by surrounding the  entire  option
           in  either  single  or  double  quotes.  Any character (including a
           backslash) may  be  included  by  prefixing  the  character  to  be
           included  with a backslash.  The file may itself contain additional
           @file options; any such options will be processed recursively.
           文件中选项以空白符分隔(\n \t ' '). 可以通过用单引号或者双引号括住带有空白符的选项。
           任何字符(包括\)通过前导的转义字符\, 都能包含进来,文件自身可能包含附加的@file选项,任何这样
  的选项将用同样的方式递归处理。


SEE ALSO //参阅
       nm(1), readelf(1), and the Info entries for binutils.
       nm, readelf,并通过 info 这二进制工具实体。


COPYRIGHT // 版权 NOT COPTLEFT


       Copyright (c) 1991, 1992, 1993, 1994, 1995,  1996,  1997,  1998,  1999,
       2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.


       Permission is granted to copy, distribute and/or modify  this  document
       under  the  terms of the GNU Free Documentation License, Version 1.1 or
       any later version published by the Free Software  Foundation;  with  no
       Invariant  Sections,  with no Front-Cover Texts, and with no Back-Cover
       Texts.  A copy of the license is included in the section entitled  "GNU
       Free Documentation License".


binutils-2.17.50.0.6-14.el5       2010-03-31                        OBJDUMP(1)


Linux manual: 


OBJDUMP(1)                   GNU Development Tools                  OBJDUMP(1)

NAME
       objdump - display information from 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]
               [--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│--dwarf]
               [-G│--stabs]
               [-t│--syms]
               [-T│--dynamic-syms]
               [-x│--all-headers]
               [-w│--wide]
               [--start-address=address]
               [--stop-address=address]
               [--prefix-addresses]
               [--[no-]show-raw-insn]
               [--adjust-vma=offset]
               [--special-syms]
               [-V│--version]
               [-H│--help]
               objfile...

DESCRIPTION
       objdump  displays  information  about  one  or  more object files.  The
  options control what particular information to display.  This  informa-
       tion 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.

OPTIONS
       The  long  and  short forms of options, shown here as alternatives, are
       equivalent.     At    least    one     option     from     the     list
       -a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-r,-R,-s,-S,-t,-T,-V,-x must be given.

       -a
       --archive-header
           If  any  of  the  objfile  files  are archives, display the archive
           header information (in a format similar to  ls  -l).   Besides  the
           information  you could list with ar tv, objdump -a shows the object
           file format of each archive member.

       --adjust-vma=offset
           When dumping information, first  add  offset  to  all  the  section
           addresses.   This  is useful if the section addresses do not corre-
           spond to the symbol table, which can happen when  putting  sections
           at particular addresses when using a format which can not represent
           section addresses, such as a.out.

       -b bfdname
       --target=bfdname
           Specify that the object-code format for the object  files  is  bfd-
           name.   This option may not be necessary; objdump can automatically
           recognize many formats.

           For example,

                   objdump -b oasys -m vax -h fu.o

           displays summary information from the section headers (-h) of fu.o,
           which  is  explicitly  identified  (-m) as a VAX object file in the
           format produced by Oasys  compilers.   You  can  list  the  formats
           available with the -i option.

       -C
       --demangle[=style]
           Decode  (demangle)  low-level  symbol  names into user-level names.
           Besides removing any initial underscore prepended  by  the  system,
        this  makes  C++ function names readable.  Different compilers have
           different mangling styles. The optional demangling  style  argument
           can be used to choose an appropriate demangling style for your com-
           piler.

       -g
       --debugging
           Display debugging information.  This attempts  to  parse  debugging
           information stored in the file and print it out using a C like syn-
           tax.  Only certain types of debugging information have been  imple-
           mented.  Some other types are supported by readelf -w.

       -e
       --debugging-tags
           Like  -g,  but  the information is generated in a format compatible
           with ctags tool.

       -d
       --disassemble
           Display the assembler mnemonics for the machine  instructions  from
           objfile.   This  option  only disassembles those sections which are
           expected to contain instructions.
  -D
       --disassemble-all
           Like -d, but disassemble the contents of  all  sections,  not  just
           those expected to contain instructions.

       --prefix-addresses
           When  disassembling, print the complete address on each line.  This
           is the older disassembly format.

       -EB
       -EL
       --endian={big│little}
           Specify the endianness of the object files.  This only affects dis-
           assembly.   This  can  be  useful  when disassembling a file format
           which does not describe endianness information, such as  S-records.

       -f
       --file-headers
           Display  summary information from the overall header of each of the
           objfile files.

       --file-start-context
           Specify that when displaying  interlisted  source  code/disassembly
        (assumes  -S)  from  a file that has not yet been displayed, extend
           the context to the start of the file.

       -h
       --section-headers
       --headers
           Display summary information from the section headers of the  object
           file.

           File  segments may be relocated to nonstandard addresses, for exam-
           ple by using the -Ttext, -Tdata, or -Tbss options to ld.   However,
           some  object file formats, such as a.out, do not store the starting
           address of the file segments.  In  those  situations,  although  ld
           relocates the sections correctly, using objdump -h to list the file
           section headers cannot show the  correct  addresses.   Instead,  it
           shows the usual addresses, which are implicit for the target.

       -H
       --help
           Print a summary of the options to objdump and exit.

       -i
       --info
     Display  a list showing all architectures and object formats avail-
           able for specification with -b or -m.

       -j name
       --section=name
           Display information only for section name.

       -l
       --line-numbers
           Label the display (using debugging information) with  the  filename
           and  source line numbers corresponding to the object code or relocs
           shown.  Only useful with -d, -D, or -r.

       -m machine
       --architecture=machine
           Specify the architecture to use when  disassembling  object  files.
           This  can  be  useful  when disassembling object files which do not
           describe architecture information, such as S-records.  You can list
           the available architectures with the -i option.

       -M options
       --disassembler-options=options
           Pass  target  specific  information to the disassembler.  Only sup-
     ported on some targets.  If it is necessary to  specify  more  than
           one disassembler option then multiple -M options can be used or can
           be placed together into a comma separated list.

           If the target is an ARM architecture then this switch can  be  used
           to  select  which  register  name  set is used during disassembler.
           Specifying -M reg-names-std (the default) will select the  register
           names as used in ARM’s instruction set documentation, but with reg-
           ister 13 called ’sp’, register  14  called  ’lr’  and  register  15
           called ’pc’.  Specifying -M reg-names-apcs will select the name set
           used by the ARM Procedure Call Standard, whilst specifying -M  reg-
           names-raw will just use r followed by the register number.

           There  are  also  two  variants  on the APCS register naming scheme
           enabled by -M reg-names-atpcs and -M reg-names-special-atpcs  which
           use  the  ARM/Thumb  Procedure  Call  Standard  naming conventions.
           (Either with the normal register  names  or  the  special  register
           names).

           This  option  can  also  be used for ARM architectures to force the
           disassembler to interpret all instructions as Thumb instructions by
           using  the  switch --disassembler-options=force-thumb.  This can be
           useful when attempting to disassemble thumb code produced by  other
    compilers.

           For  the  x86,  some  of  the options duplicate functions of the -m
           switch, but allow finer grained control.  Multiple selections  from
           the  following  may  be  specified  as  a  comma  separated string.
           x86-64, i386 and i8086 select disassembly for the  given  architec-
           ture.  intel and att select between intel syntax mode and AT&T syn-
           tax mode.  addr32, addr16, data32 and data16  specify  the  default
           address size and operand size.  These four options will be overrid-
           den if x86-64, i386 or i8086 appear later  in  the  option  string.
           Lastly,  suffix,  when  in AT&T mode, instructs the disassembler to
           print a mnemonic suffix even when the suffix could be  inferred  by
           the operands.

           For  PPC,  booke,  booke32  and booke64 select disassembly of BookE
           instructions.  32 and 64 select PowerPC and PowerPC64  disassembly,
           respectively.  e300 selects disassembly for the e300 family.

           For MIPS, this option controls the printing of instruction mnemonic
           names and register names in  disassembled  instructions.   Multiple
           selections from the following may be specified as a comma separated
           string, and invalid options are ignored:
    "no-aliases"
               Print the ’raw’ instruction mnemonic  instead  of  some  pseudo
               instruction  mnemonic.   I.e., print ’daddu’ or ’or’ instead of
               ’move’, ’sll’ instead of ’nop’, etc.

           "gpr-names=ABI"
               Print GPR (general-purpose register) names as  appropriate  for
               the  specified ABI.  By default, GPR names are selected accord-
               ing to the ABI of the binary being disassembled.

           "fpr-names=ABI"
               Print FPR (floating-point register) names  as  appropriate  for
               the  specified ABI.  By default, FPR numbers are printed rather
               than names.

           "cp0-names=ARCH"
               Print CP0 (system control coprocessor; coprocessor 0)  register
               names  as  appropriate for the CPU or architecture specified by
               ARCH.  By default, CP0 register names are selected according to
               the architecture and CPU of the binary being disassembled.

           "hwr-names=ARCH"
               Print  HWR (hardware register, used by the "rdhwr" instruction)
    names as appropriate for the CPU or architecture  specified  by
               ARCH.   By  default,  HWR  names  are selected according to the
               architecture and CPU of the binary being disassembled.

           "reg-names=ABI"
               Print GPR and FPR names as appropriate for the selected ABI.

           "reg-names=ARCH"
               Print CPU-specific register names (CP0 register and HWR  names)
               as appropriate for the selected CPU or architecture.

           For  any  of the options listed above, ABI or ARCH may be specified
           as numeric to have numbers  printed  rather  than  names,  for  the
           selected  types of registers.  You can list the available values of
           ABI and ARCH using the --help option.

           For  VAX,  you  can  specify  function  entry  addresses  with   -M
           entry:0xf00ba.   You can use this multiple times to properly disas-
           semble VAX binary files that don’t contain symbol tables (like  ROM
           dumps).  In these cases, the function entry mask would otherwise be
           decoded as VAX instructions, which would probably lead the rest  of
           the function being wrongly disassembled.

 -p
       --private-headers
           Print  information that is specific to the object file format.  The
           exact information printed depends upon the object file format.  For
           some object file formats, no additional information is printed.

       -r
       --reloc
           Print  the  relocation entries of the file.  If used with -d or -D,
           the relocations are printed interspersed with the disassembly.

       -R
       --dynamic-reloc
           Print the dynamic relocation entries of the  file.   This  is  only
           meaningful  for  dynamic  objects,  such as certain types of shared
           libraries.

       -s
       --full-contents
           Display the full contents of any sections  requested.   By  default
           all non-empty sections are displayed.

       -S
  --source
           Display  source  code  intermixed  with  disassembly,  if possible.
           Implies -d.

       --show-raw-insn
           When disassembling instructions, print the instruction  in  hex  as
           well  as  in symbolic form.  This is the default except when --pre-
           fix-addresses is used.

       --no-show-raw-insn
           When disassembling  instructions,  do  not  print  the  instruction
           bytes.  This is the default when --prefix-addresses is used.

       -W
       --dwarf
           Displays  the  contents of the DWARF debug sections in the file, if
           any are present.

       -G
       --stabs
           Display the full contents of any sections requested.   Display  the
           contents  of the .stab and .stab.index and .stab.excl sections from
           an ELF file.  This is only useful on systems (such as Solaris  2.0)
           in  which  ".stab" debugging symbol-table entries are carried in an
           ELF section.  In most other file  formats,  debugging  symbol-table
           entries  are  interleaved  with linkage symbols, and are visible in
           the --syms output.

       --start-address=address
           Start displaying data at the specified address.  This  affects  the
           output of the -d, -r and -s options.

       --stop-address=address
           Stop  displaying  data  at the specified address.  This affects the
           output of the -d, -r and -s options.

       -t
       --syms
           Print the symbol table entries of the file.  This is similar to the
           information provided by the nm program.

       -T
       --dynamic-syms
           Print  the  dynamic symbol table entries of the file.  This is only
           meaningful for dynamic objects, such as  certain  types  of  shared
           libraries.   This  is similar to the information provided by the nm
      program when given the -D (--dynamic) option.

       --special-syms
           When displaying symbols include those which the target considers to
           be  special in some way and which would not normally be of interest
           to the user.

       -V
       --version
           Print the version number of objdump and exit.

       -x
       --all-headers
           Display all available header information, including the symbol  ta-
           ble  and  relocation entries.  Using -x is equivalent to specifying
           all of -a -f -h -p -r -t.

       -w
       --wide
           Format some lines  for  output  devices  that  have  more  than  80
           columns.   Also  do  not  truncate  symbol names when they are dis-
           played.

   -z
       --disassemble-zeroes
           Normally the disassembly output will skip blocks of  zeroes.   This
           option  directs  the disassembler to disassemble those blocks, just
           like any other data.

       @file
           Read command-line options from file.  The options read are inserted
           in  place of the original @file option.  If file does not exist, or
           cannot be read, then the option will be treated literally, and  not
           removed.

           Options  in file are separated by whitespace.  A whitespace charac-
           ter may be included in an option by surrounding the  entire  option
           in  either  single  or  double  quotes.  Any character (including a
           backslash) may  be  included  by  prefixing  the  character  to  be
           included  with a backslash.  The file may itself contain additional
           @file options; any such options will be processed recursively.

SEE ALSO
       nm(1), readelf(1), and the Info entries for binutils.

COPYRIGHT

     Copyright (c) 1991, 1992, 1993, 1994, 1995,  1996,  1997,  1998,  1999,
       2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.

       Permission is granted to copy, distribute and/or modify  this  document
       under  the  terms of the GNU Free Documentation License, Version 1.1 or
       any later version published by the Free Software  Foundation;  with  no
       Invariant  Sections,  with no Front-Cover Texts, and with no Back-Cover
       Texts.  A copy of the license is included in the section entitled  "GNU
       Free Documentation License".

binutils-2.17.50.0.6-14.el5       2010-03-31                        OBJDUMP(1)



  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值