[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 2


dis Command

Purpose

Produces an assembly language listing of files.

Syntax

dis [ -a ] [ -A address ] [ -b ] [ -c count ] [ -d section ] [ -D section ] [ -F function ] [ -i ] [ -l string ] [ -L ] [ -o ] [ -s ] [ -t section ] [ -V ] [ -w size ] files...

Description

The dis command produces an assembly language listing of files, which may be object files or archives of object files. The listing includes assembly statements and an octal or hexadecimal representation of the binary that produced those statements.

On output, a number enclosed in brackets at the beginning of a line, such as [5], indicates that the break-pointable line number starts with the following instruction. These line numbers are printed only if the file is compiled with additional debugging information (for example, the -g flag of the cc command).

An expression, such as <0x1560> after the operand in the symbolic disassembly (-s flag) of control transfer instructions, is the computed address to which control is transferred.

If the object file contains a symbol table, the first column will contain a function name followed by () or a label name followed by a colon character (:). If the file is compiled with additional DWARF2 debugging information, a function name appears in the following format: func_name()@dir_name/file_name.

The -d, -D, -F, -l, and -t flags may be specified multiple times.

The self-explanatory diagnostics indicate errors in the command line or problems encountered with the specified files.

Flags

Notes:
  1. If the -A, -d, -D, -F, or -t flags are specified, only those named sections (or functions) from each user-supplied file name is disassembled. Otherwise, all sections containing executable machine instructions are disassembled.
  2. If the -A, -c, or -w flags are specified multiple times on the command line, only the last value is processed.

-a Prints the assembly code in compact form.
-A address Starts dump or disassembly at the specified address.
-b Displays the instruction binary code in hexadecimal (or octal if the -o flag is present) format.
-c count Limits disassembly to the count instructions or data bytes.
-d section Disassembles the named section as data, printing the offset of the data from the beginning of the section.
-D section Disassembles the named section as data, printing the actual address of the data.
-F function Disassembles only the named function in each object file specified on the command line.
-i Prints the raw bytes of an Itanium-based platform instruction as a stop bit followed by the template and the three instructions of a bundle.
-l string Disassembles the archive file specified by string. For example, one would issue the command dis -l x -l z to disassemble libx.a and libz.a, which are assumed to be in LIBDIR.
-L Specifies lookup source labels for subsequent printing. This flag works only if the file is compiled with additional debugging information (for example, the -g flag of the cc command).

Note: Currently unimplemented.
-o Prints numbers in octal. The default is hexadecimal.
-s Performs symbolic disassembly where possible.
-t section Disassembles the named section as text.
-V Prints, on standard error, the version number of the dis command being executed.
-w size Specifies the size of word in bytes for raw dumps, such as with -d or -D flags. Valid values of size are 1, 2, 4, and 8. The default size is 2.

Files


LIBDIR usually /usr/ccs/lib

Related Information

The as command, ld command.

The a.out file.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]