include file handling changes
[binutils-gdb.git] / binutils / objdump.1
1 .\" Copyright (c) 1991 Free Software Foundation
2 .\" See section COPYING for conditions for redistribution
3 .TH objdump 1 "5 November 1991" "cygnus support" "GNU Development Tools"
4 .de BP
5 .sp
6 .ti \-.2i
7 \(**
8 ..
9
10 .SH NAME
11 objdump\(em\&display information from object files.
12
13 .SH SYNOPSIS
14 .hy 0
15 .na
16 .TP
17 .B objdump
18 .RB "[\|" \-a "\|]"
19 .RB "[\|" "\-b\ "\c
20 .I bfdname\c
21 \&\|]
22 .RB "[\|" \-d "\|]"
23 .RB "[\|" \-f "\|]"
24 .RB "[\|" \-h | --header "\|]"
25 .RB "[\|" \-i "\|]"
26 .RB "[\|" "\-j\ "\c
27 .I section\c
28 \&\|]
29 .RB "[\|" \-l "\|]"
30 .RB "[\|" "\-m\ "\c
31 .I machine\c
32 \&\|]
33 .RB "[\|" \-r | --reloc "\|]"
34 .RB "[\|" \-s "\|]"
35 .RB "[\|" \--stabs "\|]"
36 .RB "[\|" \-t | --syms "\|]"
37 .RB "[\|" \-x "\|]"
38 .I objfiles\c
39 \&.\|.\|.
40 .ad b
41 .hy 1
42 .SH DESCRIPTION
43 \c
44 .B objdump\c
45 \& displays information about one or more object files.
46 The options control what particular information to display. This
47 information is mostly useful to programmers who are working on the
48 compilation tools, as opposed to programmers who just want their
49 program to compile and work.
50 .SH OPTIONS
51 Where long and short forms of an option are shown together, they are
52 equivalent.
53
54 .TP
55 .IR "objfiles" .\|.\|.
56 The object files to be examined. When you specify archives,
57 \c
58 .B objdump\c
59 \& shows information on each of the member object files.
60
61 .TP
62 .B \-a
63 If any files from \c
64 .I objfiles\c
65 \& are archives, display the archive
66 header information (in a format similar to `\|\c
67 .B ls \-l\c
68 \|'). Besides the
69 information you could list with `\|\c
70 .B ar tv\c
71 \|', `\|\c
72 .B objdump \-a\c
73 \|' shows
74 the object file format of each archive member.
75
76 .TP
77 .BI "-b " "bfdname"\c
78 \&
79 You can specify a particular object-code format for your object files as
80 \c
81 .I bfdname\c
82 \&. This may not be necessary; \c
83 .I objdump\c
84 \& can
85 automatically recognize many formats. For example,
86 .sp
87 .br
88 objdump\ \-b\ oasys\ \-m\ vax\ \-h\ fu.o
89 .br
90 .sp
91
92 Displays summary information from the section headers (`\|\c
93 .B \-h\c
94 \|') of
95 `\|\c
96 .B fu.o\c
97 \|', which is explicitly identified (`\|\c
98 .B \-m\c
99 \|') as a Vax object
100 file in the format produced by Oasys compilers. You can list the
101 formats available with the `\|\c
102 .B \-i\c
103 \|' option.
104
105 .TP
106 .B \-d
107 Disassemble. Display the assembler mnemonics for the machine
108 instructions from \c
109 .I objfiles\c
110 \&.
111
112 .TP
113 .B \-f
114 File header. Display summary information from the overall header of
115 each file in \c
116 .I objfiles\c
117 \&.
118
119 .TP
120 .B \-h
121 .TP
122 .B --header
123 Header. Display summary information from the section headers of the
124 object file.
125
126 .TP
127 .B \-i
128 Display a list showing all architectures and object formats available
129 for specification with \c
130 .B \-b\c
131 \& or \c
132 .B \-m\c
133 \&.
134
135 .TP
136 .BI "-j " "name"\c
137 \&
138 Display information only for section \c
139 .I name\c
140 \&
141
142 .TP
143 .B \-l
144 Label the display (using debugging information) with the source filename
145 and line numbers corresponding to the object code shown.
146
147 .TP
148 .BI "-m " "machine"\c
149 \&
150 Specify the object files \c
151 .I objfiles\c
152 \& are for architecture
153 \c
154 .I machine\c
155 \&. You can list available architectures using the `\|\c
156 .B \-i\c
157 \|'
158 option.
159
160 .TP
161 .B \-r
162 .TP
163 .B --reloc
164 Relocation. Print the relocation entries of the file.
165
166 .TP
167 .B \-s
168 Display the full contents of any sections requested.
169
170 .TP
171 .B \--stabs
172 Display the contents of the .stab, .stab.index, and .stab.excl
173 sections from an ELF file. This is only useful on systems (such as
174 Solaris 2.0) in which .stab debugging symbol-table entries are carried
175 in an ELF section. In most other file formats, debugging symbol-table
176 entries are interleaved with linkage symbols, and are visible in the
177 --syms output.
178
179 .TP
180 .B \-t
181 .TP
182 .B --syms
183 Symbol Table. Print the symbol table entries of the file.
184 This is similar to the information provided by the `\|\c
185 .B nm\c
186 \|' program.
187
188 .TP
189 .B \-x
190 Display all available header information, including the symbol table and
191 relocation entries. Using `\|\c
192 .B \-x\c
193 \|' is equivalent to specifying all of
194 `\|\c
195 .B \-a \-f \-h \-r \-t\c
196 \|'.
197
198 .PP
199
200 .SH "SEE ALSO"
201 .RB "`\|" binutils "\|'"
202 entry in
203 .B
204 info\c
205 \&;
206 .I
207 The GNU Binary Utilities\c
208 \&, Roland H. Pesch (October 1991);
209 .BR nm "(" 1 ")."
210
211 .SH COPYING
212 Copyright (c) 1991 Free Software Foundation, Inc.
213 .PP
214 Permission is granted to make and distribute verbatim copies of
215 this manual provided the copyright notice and this permission notice
216 are preserved on all copies.
217 .PP
218 Permission is granted to copy and distribute modified versions of this
219 manual under the conditions for verbatim copying, provided that the
220 entire resulting derived work is distributed under the terms of a
221 permission notice identical to this one.
222 .PP
223 Permission is granted to copy and distribute translations of this
224 manual into another language, under the above conditions for modified
225 versions, except that this permission notice may be included in
226 translations approved by the Free Software Foundation instead of in
227 the original English.