1. 程式人生 > >Linux下的objdump反彙編工具

Linux下的objdump反彙編工具

1.  [[email protected] 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
[email protected]







[[email protected] 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

[email protected]



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