DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

dis(1)


dis -- object code disassembler

Synopsis

   dis [-osV] [-A addr] [-c cnt] [-f fmt] [-F symb]
   	[-n name] [-O output] [-w sz] file . . .
Obsolete options accepted for compatibility:
   dis [-L] [-dDt sect] [-l lib]

Description

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

The following options are interpreted by the disassembler and may be specified in any order.


-A addr
Start the dump or disassembly at addr, a decimal, octal or hexadecimal number.


-c cnt
Limit the disassembly to cnt instructions or the dump to cnt data bytes. cnt is a decimal, octal or hexadecimal number.


-d section[+offset]
(Obsolete) Dump the named section as data, printing the offset as relative to the section start. If the optional +offset is present, start instead at offset bytes into the section.


-D section[+offset]
(Obsolete) Dump the named section as data, printing the virtual address as the offset. If the optional +offset is present, start instead at offset bytes into the section. offset is a decimal, octal or hexadecimal number.


-f fmt
Specify format of instruction output, where fmt is one or more of the following characters:

-
specifies the default format (abl)

a
include the instruction address

b
include the instruction raw bytes

c
specifies the compact format (just instructions) - cannot be combined with other fmt characters

f
specifies full format (ablt)

l
include source line numbers if available

t
include source text and line numbers if available


-F symbol[+offset]
Disassemble either the function symbol or dump the object symbol. If the optional +offset is present, start instead at offset bytes into the symbol. offset is a decimal, octal or hexadecimal number. By default, if symbol is found in a writable section, it is assumed not to be a function.


-l name
(Obsolete) Disassemble or dump a file named libname.a found using the default ld(1) library search path.


-L
(Obsolete) No effect.


-n section[+offset]
Disassemble or dump the named section, using the virtual address as the offset. If the optional +offset is present, start instead at offset bytes into the section. offset is a decimal, octal or hexadecimal number. By default, if section is writable its contents will be dumped as data.


-o
Print offsets in octal instead of hexadecimal.


-O output
Specify the decode model, where output is one of the following:

data
forces a data dump

text
forces a disassembly, guessing the correct instruction decoding

x86

ia32

ia32-32
forces a disassembly taking the content as Intel IA-32 instructions with 32-bit data and address sizes

286

ia32-16
forces a disassembly taking the content as Intel IA-32 instructions with 16-bit data and address sizes


-s
Append symbolic disassembly information when possible and appropriate.


-t section[+offset]
(Obsolete) Disassemble the named section as data, using the virtual address as the offset. If the optional +offset is present, start instead at offset bytes into the section. offset is a decimal, octal or hexadecimal number.


-V
Print, on standard error, the disassembler's version information.


-w sz
Specify the dump word size to be sz, a decimal, octal or hexadecimal number which must be equal to 1, 2, 4 or 8.

If given no options, dis will disassemble all nonwritable sections for each file. The -d, -D, -n or -t options restrict dis to operate only on the named section. Similarly, the -F option restricts dis to operate only on the named symbol, only one of which will be present in any object file.

On output, a number enclosed in square 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 will be printed only if the file was compiled with additional debugging information (for example, the -g option of cc). An expression such as ``<40>'' in the operand field or in the symbolic disassembly, following a relative displacement for control transfer instructions, is the computed address within the section to which control will be transferred. A function name will appear in the first column, followed by ``()'' if the object file contains a symbol table. When debugging information is present, the function name will be prefixed by file@, indicating the originating source file.

Errors

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

Files


Libdir
usually /usr/ccs/lib followed by /usr/lib.

References

a.out(4), as(1), cc(1), ld(1)

Notices

At this time, symbolic disassembly does not take advantage of additional information available if the file is compiled with the -g option.

This command has been updated to handle Intel Pentium III Streaming SIMD instructions; see ``Pentium III extended floating point support'' in New features for more information.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004