Implement generic debugging support. Implement a stabs reader and
[deliverable/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 \- display information from object files.
12
13 .SH SYNOPSIS
14 .hy 0
15 .na
16 .TP
17 .B objdump
18 .RB "[\|" \-a | \-\-archive\-headers "\|]"
19 .RB "[\|" "\-b\ "\c
20 .I bfdname\c
21 .RB " | " "\-\-target="\c
22 .I bfdname\c
23 \&\|]
24 .RB "[\|" \-\-debugging "\|]"
25 .RB "[\|" \-d | \-\-disassemble "\|]"
26 .RB "[\|" \-D | \-\-disassemble-all "\|]"
27 .RB "[\|" \-f | \-\-file\-headers "\|]"
28 .RB "[\|" \-h | \-\-section\-headers
29 .RB "| " \-\-headers "\|]"
30 .RB "[\|" \-i | \-\-info "\|]"
31 .RB "[\|" "\-j\ "\c
32 .I section\c
33 .RB " | " "\-\-section="\c
34 .I section\c
35 \&\|]
36 .RB "[\|" \-l | \-\-line\-numbers "\|]"
37 .RB "[\|" "\-m\ "\c
38 .I machine\c
39 .RB " | " "\-\-architecture="\c
40 .I machine\c
41 \&\|]
42 .RB "[\|" \-r | \-\-reloc "\|]"
43 .RB "[\|" \-R | \-\-dynamic\-reloc "\|]"
44 .RB "[\|" \-s | \-\-full\-contents "\|]"
45 .RB "[\|" \-S | \-\-source "\|]"
46 .RB "[\|" \-\-stabs "\|]"
47 .RB "[\|" \-t | \-\-syms "\|]"
48 .RB "[\|" \-T | \-\-dynamic\-syms "\|]"
49 .RB "[\|" \-x | \-\-all\-headers "\|]"
50 .RB "[\|" "\-\-start\-address="\c
51 .I address\c
52 \&\|]
53 .RB "[\|" "\-\-stop\-address="\c
54 .I address\c
55 \&\|]
56 .RB "[\|" \-\-version "\|]"
57 .RB "[\|" \-\-help "\|]"
58 .I objfile\c
59 \&.\|.\|.
60 .ad b
61 .hy 1
62 .SH DESCRIPTION
63 \c
64 .B objdump\c
65 \& displays information about one or more object files.
66 The options control what particular information to display. This
67 information is mostly useful to programmers who are working on the
68 compilation tools, as opposed to programmers who just want their
69 program to compile and work.
70 .PP
71 .IR "objfile" .\|.\|.
72 are the object files to be examined. When you specify archives,
73 \c
74 .B objdump\c
75 \& shows information on each of the member object files.
76
77 .SH OPTIONS
78 Where long and short forms of an option are shown together, they are
79 equivalent. At least one option besides
80 .B \-l
81 (\fB\-\-line\-numbers\fP) must be given.
82
83 .TP
84 .B \-a
85 .TP
86 .B \-\-archive\-headers
87 If any files from \c
88 .I objfile\c
89 \& are archives, display the archive
90 header information (in a format similar to `\|\c
91 .B ls \-l\c
92 \|'). Besides the
93 information you could list with `\|\c
94 .B ar tv\c
95 \|', `\|\c
96 .B objdump \-a\c
97 \|' shows
98 the object file format of each archive member.
99
100 .TP
101 .BI "\-b " "bfdname"\c
102 .TP
103 .BI "\-\-target=" "bfdname"
104 Specify the object-code format for the object files to be
105 \c
106 .I bfdname\c
107 \&. This may not be necessary; \c
108 .I objdump\c
109 \& can
110 automatically recognize many formats. For example,
111 .sp
112 .br
113 objdump\ \-b\ oasys\ \-m\ vax\ \-h\ fu.o
114 .br
115 .sp
116 display summary information from the section headers (`\|\c
117 .B \-h\c
118 \|') of
119 `\|\c
120 .B fu.o\c
121 \|', which is explicitly identified (`\|\c
122 .B \-m\c
123 \|') as a Vax object
124 file in the format produced by Oasys compilers. You can list the
125 formats available with the `\|\c
126 .B \-i\c
127 \|' option.
128
129 .TP
130 .B \-\-debugging
131 Display debugging information. This attempts to parse debugging
132 information stored in the file and print it out using a C like syntax.
133 Only certain types of debugging information have been implemented.
134
135 .TP
136 .B \-d
137 .TP
138 .B \-\-disassemble
139 Display the assembler mnemonics for the machine
140 instructions from \c
141 .I objfile\c
142 \&.
143 This option only disassembles those sections which are
144 expected to contain instructions.
145
146 .TP
147 .B \-D
148 .TP
149 .B \-\-disassemble-all
150 Like \fB\-d\fP, but disassemble the contents of all sections, not just
151 those expected to contain instructions.
152
153 .TP
154 .B \-f
155 .TP
156 .B \-\-file\-headers
157 Display summary information from the overall header of
158 each file in \c
159 .I objfile\c
160 \&.
161
162 .TP
163 .B \-h
164 .TP
165 .B \-\-section\-headers
166 .TP
167 .B \-\-headers
168 Display summary information from the section headers of the
169 object file.
170
171 .TP
172 .B \-\-help
173 Print a summary of the options to
174 .B objdump
175 and exit.
176
177 .TP
178 .B \-i
179 .TP
180 .B \-\-info
181 Display a list showing all architectures and object formats available
182 for specification with \c
183 .B \-b\c
184 \& or \c
185 .B \-m\c
186 \&.
187
188 .TP
189 .BI "\-j " "name"\c
190 .TP
191 .BI "\-\-section=" "name"
192 Display information only for section \c
193 .I name\c
194 \&.
195
196 .TP
197 .B \-l
198 .TP
199 .B \-\-line\-numbers
200 Label the display (using debugging information) with the filename
201 and source line numbers corresponding to the object code shown.
202 Only useful with \fB\-d\fP or \fB\-D\fP.
203
204 .TP
205 .BI "\-m " "machine"\c
206 .TP
207 .BI "\-\-architecture=" "machine"
208 Specify the object files \c
209 .I objfile\c
210 \& are for architecture
211 \c
212 .I machine\c
213 \&. You can list available architectures using the `\|\c
214 .B \-i\c
215 \|'
216 option.
217
218 .TP
219 .B \-r
220 .TP
221 .B \-\-reloc
222 Print the relocation entries of the file. If used with \fB\-d\fP or
223 \fB\-d\fP, the relocations are printed interspersed with the
224 disassembly.
225
226 .TP
227 .B \-R
228 .TP
229 .B \-\-dynamic\-reloc
230 Print the dynamic relocation entries of the file. This is only
231 meaningful for dynamic objects, such as certain types of shared
232 libraries.
233
234 .TP
235 .B \-s
236 .TP
237 .B \-\-full\-contents
238 Display the full contents of any sections requested.
239
240 .TP
241 .B \-S
242 .TP
243 .B \-\-source
244 Display source code intermixed with disassembly, if possible. Implies
245 \fB-d\fP.
246
247 .TP
248 .B \-\-stabs
249 Display the contents of the .stab, .stab.index, and .stab.excl
250 sections from an ELF file. This is only useful on systems (such as
251 Solaris 2.0) in which .stab debugging symbol-table entries are carried
252 in an ELF section. In most other file formats, debugging symbol-table
253 entries are interleaved with linkage symbols, and are visible in the
254 \-\-syms output.
255
256 .TP
257 .BI "\-\-start\-address=" "address"
258 Start displaying data at the specified address. This affects the output
259 of the
260 .B \-d\c
261 ,
262 .B \-r
263 and
264 .B \-s
265 options.
266
267 .TP
268 .BI "\-\-stop\-address=" "address"
269 Stop displaying data at the specified address. This affects the output
270 of the
271 .B \-d\c
272 ,
273 .B \-r
274 and
275 .B \-s
276 options.
277
278 .TP
279 .B \-t
280 .TP
281 .B \-\-syms
282 Symbol Table. Print the symbol table entries of the file.
283 This is similar to the information provided by the `\|\c
284 .B nm\c
285 \|' program.
286
287 .TP
288 .B \-T
289 .TP
290 .B \-\-dynamic\-syms
291 Dynamic Symbol Table. Print the dynamic symbol table entries of the
292 file. This is only meaningful for dynamic objects, such as certain
293 types of shared libraries. This is similar to the information
294 provided by the `\|\c
295 .B nm\c
296 \|' program when given the
297 .B \-D (\-\-dynamic)
298 option.
299
300 .TP
301 .B \-\-version
302 Print the version number of
303 .B objdump
304 and exit.
305
306 .TP
307 .B \-x
308 .TP
309 .B \-\-all\-headers
310 Display all available header information, including the symbol table and
311 relocation entries. Using `\|\c
312 .B \-x\c
313 \|' is equivalent to specifying all of
314 `\|\c
315 .B \-a \-f \-h \-r \-t\c
316 \|'.
317
318 .SH "SEE ALSO"
319 .RB "`\|" binutils "\|'"
320 entry in
321 .B
322 info\c
323 \&;
324 .I
325 The GNU Binary Utilities\c
326 \&, Roland H. Pesch (October 1991);
327 .BR nm "(" 1 ")."
328
329 .SH COPYING
330 Copyright (c) 1991 Free Software Foundation, Inc.
331 .PP
332 Permission is granted to make and distribute verbatim copies of
333 this manual provided the copyright notice and this permission notice
334 are preserved on all copies.
335 .PP
336 Permission is granted to copy and distribute modified versions of this
337 manual under the conditions for verbatim copying, provided that the
338 entire resulting derived work is distributed under the terms of a
339 permission notice identical to this one.
340 .PP
341 Permission is granted to copy and distribute translations of this
342 manual into another language, under the above conditions for modified
343 versions, except that this permission notice may be included in
344 translations approved by the Free Software Foundation instead of in
345 the original English.
This page took 0.037018 seconds and 5 git commands to generate.