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