5 stars based on
The options control what particular information to display. This information is mostly useful to programmers who are working on the compilation tools, as opposed to programmers who just want their program to compile and work. When you specify archives, objdump gnu binary utilities objdump information on each of the member object files. The long and short forms of options, shown here as alternatives, are equivalent.
When dumping information, first add offset to all the section addresses. This is useful if the section addresses do not correspond to the symbol table, which can happen when gnu binary utilities objdump sections at particular addresses when using a format which can not represent section addresses, such as a. Specify that the object-code format for the object files is bfdname. This option may not be necessary; objdump can automatically recognize many formats.
You can list the formats available with the -i option. See Target Selectionfor more information. Decode demangle low-level symbol names into user-level names. Different compilers have different mangling styles. The optional demangling style argument can be used to choose an appropriate demangling style for your compiler.
If neither of these formats are found this option falls back on the -W option to print any DWARF information in the file. Display the assembler mnemonics for the machine instructions from objfile. This option gnu binary utilities objdump disassembles those sections which are expected to contain instructions.
Like -dbut disassemble the contents of all sections, not just those expected to contain instructions. This option also has gnu binary utilities objdump subtle effect on the disassembly of instructions in code sections. When option -d is in effect objdump will assume that any symbols present in a code section occur on the boundary between instructions and it will refuse to disassemble across such a boundary. When option -D is in effect however this assumption is supressed.
This means that it is possible for the output of -d and -D to differ if, for example, data is stored in code sections. If the target is an ARM architecture this switch also has the effect of forcing the disassembler to decode pieces of data found in code sections as if they were instructions. When disassembling, print the complete address on each line.
This is the older disassembly format. Specify the endianness of the object files. This only affects disassembly. This can be useful when disassembling a file format which does not describe endianness gnu binary utilities objdump, such as S-records. When disassembling sections, whenever a symbol is displayed, also gnu binary utilities objdump the file offset of the region of data that is about to be dumped.
If gnu binary utilities objdump are being skipped, then when disassembly resumes, tell the user how many zeroes were skipped and the file offset of the location from where the disassembly resumes. When dumping sections, display the file offset of the location gnu binary utilities objdump where the dump starts.
File segments may be relocated to nonstandard gnu binary utilities objdump, for example by gnu binary utilities objdump the -Ttext-Tdataor -Tbss options to gnu binary utilities objdump. However, some object file formats, such as a. Gnu binary utilities objdump, it shows the usual addresses, which are implicit for the target. In such cases the NOREAD attribute takes precedence, but objdump will report both since the exact setting of the flag bits might be important.
Display a list showing all architectures and object formats available for specification with -b or -m. 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-Dor -r. 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. If the target is an ARM architecture then gnu binary utilities objdump switch has an additional effect.
It restricts the disassembly to only those instructions supported by the architecture specified by machine. If it is necessary to use this switch because the input file does not contain any architecture information, but it is also desired to disassemble gnu binary utilities objdump the instructions use -marm. 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. Additionally, one can choose to have all the immediates printed in hexadecimal using hex. By default, the short immediates are printed using the decimal representation, while the long immediate values are printed as hexadecimal.
This option might be specified multiple times - only the latest value will be used. If the target is an ARM architecture then this switch can be used to select which register name set is used during disassembler. Either with the normal register names or the special register names.
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. Specify the default address size and operand size. These four options will be overridden if xi or i appear later in the option string. For PowerPC, the -M argument raw selects disasssembly of hardware insns rather than aliases.
For example, you will see rlwinm rather than clrlwiand addi rather than li. All of the -m arguments for gas that select a CPU are supported. In addition, altivecanyhtmvsxand gnu binary utilities objdump add capabilities to gnu binary utilities objdump previous or later CPU selection.
If you disassemble without giving a CPU selection, a default will be chosen from information gleaned by BFD from the object files headers, but the result again may not be as you expect. For MIPS, this option gnu binary utilities objdump 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 gnu binary utilities objdump options are ignored:.
By default, FPR numbers are printed rather than names. By default, CP0 gnu binary utilities objdump names are selected according to the architecture and CPU of the binary being disassembled. For VAX, you can specify function entry addresses with -M entry: 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.
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.
The argument options is a comma separated list that depends on the format the lists of options is displayed with the gnu binary utilities objdump. Print the relocation entries of the file. If used with -d or -Dthe relocations are printed interspersed with the disassembly. Print the dynamic relocation entries of the file. This is only meaningful for dynamic objects, such as certain types of shared libraries.
As for -rif used with -d or -Dthe relocations are printed interspersed with the disassembly. Display the full contents of any sections requested. By default all non-empty sections are displayed.
Indicate how many initial directory names to strip off the hardwired absolute paths. When disassembling instructions, print the instruction gnu binary utilities objdump hex as well as in symbolic form.
This is the default except when --prefix-addresses is used. When disassembling instructions, do not print the instruction bytes. This is the default when --prefix-addresses is used. Compressed debug sections are automatically decompressed temporarily before they are displayed.
If one or more of the optional letters or words follows the switch then only those type s of data will be dumped. The letters and words refer to the following information:. Display the contents of any selected gnu binary utilities objdump sections that are found in a linked, separate debug info file. This can result in multiple versions of the same debug section being displayed if both the main file and the separate debug info file contain sections with the same name. In addition, when displaying DWARF attributes, if a form is found that references the separate debug info file, then the referenced contents will also be displayed.
Limit the dump of the. The default is to print all DIEs; the special value 0 for n will also have this effect. With a non-zero value for nDIEs at or deeper than n levels will not be printed. The range for n is zero-based. Only siblings and children of the specified DIE will be printed. Display the contents of the.
This is only useful on systems such as Solaris 2. In most other file formats, debugging symbol-table entries are interleaved with linkage symbols, and are visible in the --syms output. Start displaying data at the specified address. This affects the output of the -d-r and -s options.