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