Initial import of binutils 2.22 on the new vendor branch
[dragonfly.git] / contrib / binutils-2.21 / binutils / doc / objcopy.1
1 .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
29 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
30 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
31 .\" nothing in troff, for use with C<>.
32 .tr \(*W-
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" Escape single quotes in literal strings from groff's Unicode transform.
52 .ie \n(.g .ds Aq \(aq
53 .el       .ds Aq '
54 .\"
55 .\" If the F register is turned on, we'll generate index entries on stderr for
56 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
57 .\" entries marked with X<> in POD.  Of course, you'll have to process the
58 .\" output yourself in some meaningful fashion.
59 .ie \nF \{\
60 .    de IX
61 .    tm Index:\\$1\t\\n%\t"\\$2"
62 ..
63 .    nr % 0
64 .    rr F
65 .\}
66 .el \{\
67 .    de IX
68 ..
69 .\}
70 .\"
71 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
72 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
73 .    \" fudge factors for nroff and troff
74 .if n \{\
75 .    ds #H 0
76 .    ds #V .8m
77 .    ds #F .3m
78 .    ds #[ \f1
79 .    ds #] \fP
80 .\}
81 .if t \{\
82 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
83 .    ds #V .6m
84 .    ds #F 0
85 .    ds #[ \&
86 .    ds #] \&
87 .\}
88 .    \" simple accents for nroff and troff
89 .if n \{\
90 .    ds ' \&
91 .    ds ` \&
92 .    ds ^ \&
93 .    ds , \&
94 .    ds ~ ~
95 .    ds /
96 .\}
97 .if t \{\
98 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
99 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
100 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
101 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
102 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
103 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
104 .\}
105 .    \" troff and (daisy-wheel) nroff accents
106 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
107 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
108 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
109 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
110 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
111 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
112 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
113 .ds ae a\h'-(\w'a'u*4/10)'e
114 .ds Ae A\h'-(\w'A'u*4/10)'E
115 .    \" corrections for vroff
116 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
117 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
118 .    \" for low resolution devices (crt and lpr)
119 .if \n(.H>23 .if \n(.V>19 \
120 \{\
121 .    ds : e
122 .    ds 8 ss
123 .    ds o a
124 .    ds d- d\h'-1'\(ga
125 .    ds D- D\h'-1'\(hy
126 .    ds th \o'bp'
127 .    ds Th \o'LP'
128 .    ds ae ae
129 .    ds Ae AE
130 .\}
131 .rm #[ #] #H #V #F C
132 .\" ========================================================================
133 .\"
134 .IX Title "OBJCOPY 1"
135 .TH OBJCOPY 1 "2011-06-27" "binutils-2.21.1" "GNU Development Tools"
136 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
137 .\" way too many mistakes in technical documents.
138 .if n .ad l
139 .nh
140 .SH "NAME"
141 objcopy \- copy and translate object files
142 .SH "SYNOPSIS"
143 .IX Header "SYNOPSIS"
144 objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
145         [\fB\-I\fR \fIbfdname\fR|\fB\-\-input\-target=\fR\fIbfdname\fR]
146         [\fB\-O\fR \fIbfdname\fR|\fB\-\-output\-target=\fR\fIbfdname\fR]
147         [\fB\-B\fR \fIbfdarch\fR|\fB\-\-binary\-architecture=\fR\fIbfdarch\fR]
148         [\fB\-S\fR|\fB\-\-strip\-all\fR]
149         [\fB\-g\fR|\fB\-\-strip\-debug\fR]
150         [\fB\-K\fR \fIsymbolname\fR|\fB\-\-keep\-symbol=\fR\fIsymbolname\fR]
151         [\fB\-N\fR \fIsymbolname\fR|\fB\-\-strip\-symbol=\fR\fIsymbolname\fR]
152         [\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR]
153         [\fB\-G\fR \fIsymbolname\fR|\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR]
154         [\fB\-\-localize\-hidden\fR]
155         [\fB\-L\fR \fIsymbolname\fR|\fB\-\-localize\-symbol=\fR\fIsymbolname\fR]
156         [\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR]
157         [\fB\-W\fR \fIsymbolname\fR|\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR]
158         [\fB\-w\fR|\fB\-\-wildcard\fR]
159         [\fB\-x\fR|\fB\-\-discard\-all\fR]
160         [\fB\-X\fR|\fB\-\-discard\-locals\fR]
161         [\fB\-b\fR \fIbyte\fR|\fB\-\-byte=\fR\fIbyte\fR]
162         [\fB\-i\fR [\fIbreadth\fR]|\fB\-\-interleave\fR[=\fIbreadth\fR]]
163         [\fB\-\-interleave\-width=\fR\fIwidth\fR]
164         [\fB\-j\fR \fIsectionname\fR|\fB\-\-only\-section=\fR\fIsectionname\fR]
165         [\fB\-R\fR \fIsectionname\fR|\fB\-\-remove\-section=\fR\fIsectionname\fR]
166         [\fB\-p\fR|\fB\-\-preserve\-dates\fR]
167         [\fB\-\-debugging\fR]
168         [\fB\-\-gap\-fill=\fR\fIval\fR]
169         [\fB\-\-pad\-to=\fR\fIaddress\fR]
170         [\fB\-\-set\-start=\fR\fIval\fR]
171         [\fB\-\-adjust\-start=\fR\fIincr\fR]
172         [\fB\-\-change\-addresses=\fR\fIincr\fR]
173         [\fB\-\-change\-section\-address\fR \fIsection\fR{=,+,\-}\fIval\fR]
174         [\fB\-\-change\-section\-lma\fR \fIsection\fR{=,+,\-}\fIval\fR]
175         [\fB\-\-change\-section\-vma\fR \fIsection\fR{=,+,\-}\fIval\fR]
176         [\fB\-\-change\-warnings\fR] [\fB\-\-no\-change\-warnings\fR]
177         [\fB\-\-set\-section\-flags\fR \fIsection\fR=\fIflags\fR]
178         [\fB\-\-add\-section\fR \fIsectionname\fR=\fIfilename\fR]
179         [\fB\-\-rename\-section\fR \fIoldname\fR=\fInewname\fR[,\fIflags\fR]]
180         [\fB\-\-long\-section\-names\fR {enable,disable,keep}]
181         [\fB\-\-change\-leading\-char\fR] [\fB\-\-remove\-leading\-char\fR]
182         [\fB\-\-reverse\-bytes=\fR\fInum\fR]
183         [\fB\-\-srec\-len=\fR\fIival\fR] [\fB\-\-srec\-forceS3\fR]
184         [\fB\-\-redefine\-sym\fR \fIold\fR=\fInew\fR]
185         [\fB\-\-redefine\-syms=\fR\fIfilename\fR]
186         [\fB\-\-weaken\fR]
187         [\fB\-\-keep\-symbols=\fR\fIfilename\fR]
188         [\fB\-\-strip\-symbols=\fR\fIfilename\fR]
189         [\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR]
190         [\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR]
191         [\fB\-\-localize\-symbols=\fR\fIfilename\fR]
192         [\fB\-\-globalize\-symbols=\fR\fIfilename\fR]
193         [\fB\-\-weaken\-symbols=\fR\fIfilename\fR]
194         [\fB\-\-alt\-machine\-code=\fR\fIindex\fR]
195         [\fB\-\-prefix\-symbols=\fR\fIstring\fR]
196         [\fB\-\-prefix\-sections=\fR\fIstring\fR]
197         [\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR]
198         [\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR]
199         [\fB\-\-keep\-file\-symbols\fR]
200         [\fB\-\-only\-keep\-debug\fR]
201         [\fB\-\-extract\-symbol\fR]
202         [\fB\-\-writable\-text\fR]
203         [\fB\-\-readonly\-text\fR]
204         [\fB\-\-pure\fR]
205         [\fB\-\-impure\fR]
206         [\fB\-\-file\-alignment=\fR\fInum\fR]
207         [\fB\-\-heap=\fR\fIsize\fR]
208         [\fB\-\-image\-base=\fR\fIaddress\fR]
209         [\fB\-\-section\-alignment=\fR\fInum\fR]
210         [\fB\-\-stack=\fR\fIsize\fR]
211         [\fB\-\-subsystem=\fR\fIwhich\fR:\fImajor\fR.\fIminor\fR]
212         [\fB\-\-compress\-debug\-sections\fR]
213         [\fB\-\-decompress\-debug\-sections\fR]
214         [\fB\-v\fR|\fB\-\-verbose\fR]
215         [\fB\-V\fR|\fB\-\-version\fR]
216         [\fB\-\-help\fR] [\fB\-\-info\fR]
217         \fIinfile\fR [\fIoutfile\fR]
218 .SH "DESCRIPTION"
219 .IX Header "DESCRIPTION"
220 The \s-1GNU\s0 \fBobjcopy\fR utility copies the contents of an object
221 file to another.  \fBobjcopy\fR uses the \s-1GNU\s0 \s-1BFD\s0 Library to
222 read and write the object files.  It can write the destination object
223 file in a format different from that of the source object file.  The
224 exact behavior of \fBobjcopy\fR is controlled by command-line options.
225 Note that \fBobjcopy\fR should be able to copy a fully linked file
226 between any two formats. However, copying a relocatable object file
227 between any two formats may not work as expected.
228 .PP
229 \&\fBobjcopy\fR creates temporary files to do its translations and
230 deletes them afterward.  \fBobjcopy\fR uses \s-1BFD\s0 to do all its
231 translation work; it has access to all the formats described in \s-1BFD\s0
232 and thus is able to recognize most formats without being told
233 explicitly.
234 .PP
235 \&\fBobjcopy\fR can be used to generate S\-records by using an output
236 target of \fBsrec\fR (e.g., use \fB\-O srec\fR).
237 .PP
238 \&\fBobjcopy\fR can be used to generate a raw binary file by using an
239 output target of \fBbinary\fR (e.g., use \fB\-O binary\fR).  When
240 \&\fBobjcopy\fR generates a raw binary file, it will essentially produce
241 a memory dump of the contents of the input object file.  All symbols and
242 relocation information will be discarded.  The memory dump will start at
243 the load address of the lowest section copied into the output file.
244 .PP
245 When generating an S\-record or a raw binary file, it may be helpful to
246 use \fB\-S\fR to remove sections containing debugging information.  In
247 some cases \fB\-R\fR will be useful to remove sections which contain
248 information that is not needed by the binary file.
249 .PP
250 Note\-\-\-\fBobjcopy\fR is not able to change the endianness of its input
251 files.  If the input format has an endianness (some formats do not),
252 \&\fBobjcopy\fR can only copy the inputs into file formats that have the
253 same endianness or which have no endianness (e.g., \fBsrec\fR).
254 (However, see the \fB\-\-reverse\-bytes\fR option.)
255 .SH "OPTIONS"
256 .IX Header "OPTIONS"
257 .IP "\fIinfile\fR" 4
258 .IX Item "infile"
259 .PD 0
260 .IP "\fIoutfile\fR" 4
261 .IX Item "outfile"
262 .PD
263 The input and output files, respectively.
264 If you do not specify \fIoutfile\fR, \fBobjcopy\fR creates a
265 temporary file and destructively renames the result with
266 the name of \fIinfile\fR.
267 .IP "\fB\-I\fR \fIbfdname\fR" 4
268 .IX Item "-I bfdname"
269 .PD 0
270 .IP "\fB\-\-input\-target=\fR\fIbfdname\fR" 4
271 .IX Item "--input-target=bfdname"
272 .PD
273 Consider the source file's object format to be \fIbfdname\fR, rather than
274 attempting to deduce it.
275 .IP "\fB\-O\fR \fIbfdname\fR" 4
276 .IX Item "-O bfdname"
277 .PD 0
278 .IP "\fB\-\-output\-target=\fR\fIbfdname\fR" 4
279 .IX Item "--output-target=bfdname"
280 .PD
281 Write the output file using the object format \fIbfdname\fR.
282 .IP "\fB\-F\fR \fIbfdname\fR" 4
283 .IX Item "-F bfdname"
284 .PD 0
285 .IP "\fB\-\-target=\fR\fIbfdname\fR" 4
286 .IX Item "--target=bfdname"
287 .PD
288 Use \fIbfdname\fR as the object format for both the input and the output
289 file; i.e., simply transfer data from source to destination with no
290 translation.
291 .IP "\fB\-B\fR \fIbfdarch\fR" 4
292 .IX Item "-B bfdarch"
293 .PD 0
294 .IP "\fB\-\-binary\-architecture=\fR\fIbfdarch\fR" 4
295 .IX Item "--binary-architecture=bfdarch"
296 .PD
297 Useful when transforming a architecture-less input file into an object file.
298 In this case the output architecture can be set to \fIbfdarch\fR.  This
299 option will be ignored if the input file has a known \fIbfdarch\fR.  You
300 can access this binary data inside a program by referencing the special
301 symbols that are created by the conversion process.  These symbols are
302 called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and
303 _binary_\fIobjfile\fR_size.  e.g. you can transform a picture file into
304 an object file and then access it in your code using these symbols.
305 .IP "\fB\-j\fR \fIsectionname\fR" 4
306 .IX Item "-j sectionname"
307 .PD 0
308 .IP "\fB\-\-only\-section=\fR\fIsectionname\fR" 4
309 .IX Item "--only-section=sectionname"
310 .PD
311 Copy only the named section from the input file to the output file.
312 This option may be given more than once.  Note that using this option
313 inappropriately may make the output file unusable.
314 .IP "\fB\-R\fR \fIsectionname\fR" 4
315 .IX Item "-R sectionname"
316 .PD 0
317 .IP "\fB\-\-remove\-section=\fR\fIsectionname\fR" 4
318 .IX Item "--remove-section=sectionname"
319 .PD
320 Remove any section named \fIsectionname\fR from the output file.  This
321 option may be given more than once.  Note that using this option
322 inappropriately may make the output file unusable.
323 .IP "\fB\-S\fR" 4
324 .IX Item "-S"
325 .PD 0
326 .IP "\fB\-\-strip\-all\fR" 4
327 .IX Item "--strip-all"
328 .PD
329 Do not copy relocation and symbol information from the source file.
330 .IP "\fB\-g\fR" 4
331 .IX Item "-g"
332 .PD 0
333 .IP "\fB\-\-strip\-debug\fR" 4
334 .IX Item "--strip-debug"
335 .PD
336 Do not copy debugging symbols or sections from the source file.
337 .IP "\fB\-\-strip\-unneeded\fR" 4
338 .IX Item "--strip-unneeded"
339 Strip all symbols that are not needed for relocation processing.
340 .IP "\fB\-K\fR \fIsymbolname\fR" 4
341 .IX Item "-K symbolname"
342 .PD 0
343 .IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4
344 .IX Item "--keep-symbol=symbolname"
345 .PD
346 When stripping symbols, keep symbol \fIsymbolname\fR even if it would
347 normally be stripped.  This option may be given more than once.
348 .IP "\fB\-N\fR \fIsymbolname\fR" 4
349 .IX Item "-N symbolname"
350 .PD 0
351 .IP "\fB\-\-strip\-symbol=\fR\fIsymbolname\fR" 4
352 .IX Item "--strip-symbol=symbolname"
353 .PD
354 Do not copy symbol \fIsymbolname\fR from the source file.  This option
355 may be given more than once.
356 .IP "\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR" 4
357 .IX Item "--strip-unneeded-symbol=symbolname"
358 Do not copy symbol \fIsymbolname\fR from the source file unless it is needed
359 by a relocation.  This option may be given more than once.
360 .IP "\fB\-G\fR \fIsymbolname\fR" 4
361 .IX Item "-G symbolname"
362 .PD 0
363 .IP "\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR" 4
364 .IX Item "--keep-global-symbol=symbolname"
365 .PD
366 Keep only symbol \fIsymbolname\fR global.  Make all other symbols local
367 to the file, so that they are not visible externally.  This option may
368 be given more than once.
369 .IP "\fB\-\-localize\-hidden\fR" 4
370 .IX Item "--localize-hidden"
371 In an \s-1ELF\s0 object, mark all symbols that have hidden or internal visibility
372 as local.  This option applies on top of symbol-specific localization options
373 such as \fB\-L\fR.
374 .IP "\fB\-L\fR \fIsymbolname\fR" 4
375 .IX Item "-L symbolname"
376 .PD 0
377 .IP "\fB\-\-localize\-symbol=\fR\fIsymbolname\fR" 4
378 .IX Item "--localize-symbol=symbolname"
379 .PD
380 Make symbol \fIsymbolname\fR local to the file, so that it is not
381 visible externally.  This option may be given more than once.
382 .IP "\fB\-W\fR \fIsymbolname\fR" 4
383 .IX Item "-W symbolname"
384 .PD 0
385 .IP "\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR" 4
386 .IX Item "--weaken-symbol=symbolname"
387 .PD
388 Make symbol \fIsymbolname\fR weak. This option may be given more than once.
389 .IP "\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR" 4
390 .IX Item "--globalize-symbol=symbolname"
391 Give symbol \fIsymbolname\fR global scoping so that it is visible
392 outside of the file in which it is defined.  This option may be given
393 more than once.
394 .IP "\fB\-w\fR" 4
395 .IX Item "-w"
396 .PD 0
397 .IP "\fB\-\-wildcard\fR" 4
398 .IX Item "--wildcard"
399 .PD
400 Permit regular expressions in \fIsymbolname\fRs used in other command
401 line options.  The question mark (?), asterisk (*), backslash (\e) and
402 square brackets ([]) operators can be used anywhere in the symbol
403 name.  If the first character of the symbol name is the exclamation
404 point (!) then the sense of the switch is reversed for that symbol.
405 For example:
406 .Sp
407 .Vb 1
408 \&          \-w \-W !foo \-W fo*
409 .Ve
410 .Sp
411 would cause objcopy to weaken all symbols that start with \*(L"fo\*(R"
412 except for the symbol \*(L"foo\*(R".
413 .IP "\fB\-x\fR" 4
414 .IX Item "-x"
415 .PD 0
416 .IP "\fB\-\-discard\-all\fR" 4
417 .IX Item "--discard-all"
418 .PD
419 Do not copy non-global symbols from the source file.
420 .IP "\fB\-X\fR" 4
421 .IX Item "-X"
422 .PD 0
423 .IP "\fB\-\-discard\-locals\fR" 4
424 .IX Item "--discard-locals"
425 .PD
426 Do not copy compiler-generated local symbols.
427 (These usually start with \fBL\fR or \fB.\fR.)
428 .IP "\fB\-b\fR \fIbyte\fR" 4
429 .IX Item "-b byte"
430 .PD 0
431 .IP "\fB\-\-byte=\fR\fIbyte\fR" 4
432 .IX Item "--byte=byte"
433 .PD
434 If interleaving has been enabled via the \fB\-\-interleave\fR option
435 then start the range of bytes to keep at the \fIbyte\fRth byte.
436 \&\fIbyte\fR can be in the range from 0 to \fIbreadth\fR\-1, where
437 \&\fIbreadth\fR is the value given by the \fB\-\-interleave\fR option.
438 .IP "\fB\-i [\fR\fIbreadth\fR\fB]\fR" 4
439 .IX Item "-i [breadth]"
440 .PD 0
441 .IP "\fB\-\-interleave[=\fR\fIbreadth\fR\fB]\fR" 4
442 .IX Item "--interleave[=breadth]"
443 .PD
444 Only copy a range out of every \fIbreadth\fR bytes.  (Header data is
445 not affected).  Select which byte in the range begins the copy with
446 the \fB\-\-byte\fR option.  Select the width of the range with the
447 \&\fB\-\-interleave\-width\fR option.
448 .Sp
449 This option is useful for creating files to program \s-1ROM\s0.  It is
450 typically used with an \f(CW\*(C`srec\*(C'\fR output target.  Note that
451 \&\fBobjcopy\fR will complain if you do not specify the
452 \&\fB\-\-byte\fR option as well.
453 .Sp
454 The default interleave breadth is 4, so with \fB\-\-byte\fR set to 0,
455 \&\fBobjcopy\fR would copy the first byte out of every four bytes
456 from the input to the output.
457 .IP "\fB\-\-interleave\-width=\fR\fIwidth\fR" 4
458 .IX Item "--interleave-width=width"
459 When used with the \fB\-\-interleave\fR option, copy \fIwidth\fR
460 bytes at a time.  The start of the range of bytes to be copied is set
461 by the \fB\-\-byte\fR option, and the extent of the range is set with
462 the \fB\-\-interleave\fR option.
463 .Sp
464 The default value for this option is 1.  The value of \fIwidth\fR plus
465 the \fIbyte\fR value set by the \fB\-\-byte\fR option must not exceed
466 the interleave breadth set by the \fB\-\-interleave\fR option.
467 .Sp
468 This option can be used to create images for two 16\-bit flashes interleaved
469 in a 32\-bit bus by passing \fB\-b 0 \-i 4 \-\-interleave\-width=2\fR
470 and \fB\-b 2 \-i 4 \-\-interleave\-width=2\fR to two \fBobjcopy\fR
471 commands.  If the input was '12345678' then the outputs would be
472 \&'1256' and '3478' respectively.
473 .IP "\fB\-p\fR" 4
474 .IX Item "-p"
475 .PD 0
476 .IP "\fB\-\-preserve\-dates\fR" 4
477 .IX Item "--preserve-dates"
478 .PD
479 Set the access and modification dates of the output file to be the same
480 as those of the input file.
481 .IP "\fB\-\-debugging\fR" 4
482 .IX Item "--debugging"
483 Convert debugging information, if possible.  This is not the default
484 because only certain debugging formats are supported, and the
485 conversion process can be time consuming.
486 .IP "\fB\-\-gap\-fill\fR \fIval\fR" 4
487 .IX Item "--gap-fill val"
488 Fill gaps between sections with \fIval\fR.  This operation applies to
489 the \fIload address\fR (\s-1LMA\s0) of the sections.  It is done by increasing
490 the size of the section with the lower address, and filling in the extra
491 space created with \fIval\fR.
492 .IP "\fB\-\-pad\-to\fR \fIaddress\fR" 4
493 .IX Item "--pad-to address"
494 Pad the output file up to the load address \fIaddress\fR.  This is
495 done by increasing the size of the last section.  The extra space is
496 filled in with the value specified by \fB\-\-gap\-fill\fR (default zero).
497 .IP "\fB\-\-set\-start\fR \fIval\fR" 4
498 .IX Item "--set-start val"
499 Set the start address of the new file to \fIval\fR.  Not all object file
500 formats support setting the start address.
501 .IP "\fB\-\-change\-start\fR \fIincr\fR" 4
502 .IX Item "--change-start incr"
503 .PD 0
504 .IP "\fB\-\-adjust\-start\fR \fIincr\fR" 4
505 .IX Item "--adjust-start incr"
506 .PD
507 Change the start address by adding \fIincr\fR.  Not all object file
508 formats support setting the start address.
509 .IP "\fB\-\-change\-addresses\fR \fIincr\fR" 4
510 .IX Item "--change-addresses incr"
511 .PD 0
512 .IP "\fB\-\-adjust\-vma\fR \fIincr\fR" 4
513 .IX Item "--adjust-vma incr"
514 .PD
515 Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start
516 address, by adding \fIincr\fR.  Some object file formats do not permit
517 section addresses to be changed arbitrarily.  Note that this does not
518 relocate the sections; if the program expects sections to be loaded at a
519 certain address, and this option is used to change the sections such
520 that they are loaded at a different address, the program may fail.
521 .IP "\fB\-\-change\-section\-address\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
522 .IX Item "--change-section-address section{=,+,-}val"
523 .PD 0
524 .IP "\fB\-\-adjust\-section\-vma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
525 .IX Item "--adjust-section-vma section{=,+,-}val"
526 .PD
527 Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named
528 \&\fIsection\fR.  If \fB=\fR is used, the section address is set to
529 \&\fIval\fR.  Otherwise, \fIval\fR is added to or subtracted from the
530 section address.  See the comments under \fB\-\-change\-addresses\fR,
531 above. If \fIsection\fR does not exist in the input file, a warning will
532 be issued, unless \fB\-\-no\-change\-warnings\fR is used.
533 .IP "\fB\-\-change\-section\-lma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
534 .IX Item "--change-section-lma section{=,+,-}val"
535 Set or change the \s-1LMA\s0 address of the named \fIsection\fR.  The \s-1LMA\s0
536 address is the address where the section will be loaded into memory at
537 program load time.  Normally this is the same as the \s-1VMA\s0 address, which
538 is the address of the section at program run time, but on some systems,
539 especially those where a program is held in \s-1ROM\s0, the two can be
540 different.  If \fB=\fR is used, the section address is set to
541 \&\fIval\fR.  Otherwise, \fIval\fR is added to or subtracted from the
542 section address.  See the comments under \fB\-\-change\-addresses\fR,
543 above.  If \fIsection\fR does not exist in the input file, a warning
544 will be issued, unless \fB\-\-no\-change\-warnings\fR is used.
545 .IP "\fB\-\-change\-section\-vma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
546 .IX Item "--change-section-vma section{=,+,-}val"
547 Set or change the \s-1VMA\s0 address of the named \fIsection\fR.  The \s-1VMA\s0
548 address is the address where the section will be located once the
549 program has started executing.  Normally this is the same as the \s-1LMA\s0
550 address, which is the address where the section will be loaded into
551 memory, but on some systems, especially those where a program is held in
552 \&\s-1ROM\s0, the two can be different.  If \fB=\fR is used, the section address
553 is set to \fIval\fR.  Otherwise, \fIval\fR is added to or subtracted
554 from the section address.  See the comments under
555 \&\fB\-\-change\-addresses\fR, above.  If \fIsection\fR does not exist in
556 the input file, a warning will be issued, unless
557 \&\fB\-\-no\-change\-warnings\fR is used.
558 .IP "\fB\-\-change\-warnings\fR" 4
559 .IX Item "--change-warnings"
560 .PD 0
561 .IP "\fB\-\-adjust\-warnings\fR" 4
562 .IX Item "--adjust-warnings"
563 .PD
564 If \fB\-\-change\-section\-address\fR or \fB\-\-change\-section\-lma\fR or
565 \&\fB\-\-change\-section\-vma\fR is used, and the named section does not
566 exist, issue a warning.  This is the default.
567 .IP "\fB\-\-no\-change\-warnings\fR" 4
568 .IX Item "--no-change-warnings"
569 .PD 0
570 .IP "\fB\-\-no\-adjust\-warnings\fR" 4
571 .IX Item "--no-adjust-warnings"
572 .PD
573 Do not issue a warning if \fB\-\-change\-section\-address\fR or
574 \&\fB\-\-adjust\-section\-lma\fR or \fB\-\-adjust\-section\-vma\fR is used, even
575 if the named section does not exist.
576 .IP "\fB\-\-set\-section\-flags\fR \fIsection\fR\fB=\fR\fIflags\fR" 4
577 .IX Item "--set-section-flags section=flags"
578 Set the flags for the named section.  The \fIflags\fR argument is a
579 comma separated string of flag names.  The recognized names are
580 \&\fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR,
581 \&\fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, \fBshare\fR, and
582 \&\fBdebug\fR.  You can set the \fBcontents\fR flag for a section which
583 does not have contents, but it is not meaningful to clear the
584 \&\fBcontents\fR flag of a section which does have contents\*(--just remove
585 the section instead.  Not all flags are meaningful for all object file
586 formats.
587 .IP "\fB\-\-add\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4
588 .IX Item "--add-section sectionname=filename"
589 Add a new section named \fIsectionname\fR while copying the file.  The
590 contents of the new section are taken from the file \fIfilename\fR.  The
591 size of the section will be the size of the file.  This option only
592 works on file formats which can support sections with arbitrary names.
593 .IP "\fB\-\-rename\-section\fR \fIoldname\fR\fB=\fR\fInewname\fR\fB[,\fR\fIflags\fR\fB]\fR" 4
594 .IX Item "--rename-section oldname=newname[,flags]"
595 Rename a section from \fIoldname\fR to \fInewname\fR, optionally
596 changing the section's flags to \fIflags\fR in the process.  This has
597 the advantage over usng a linker script to perform the rename in that
598 the output stays as an object file and does not become a linked
599 executable.
600 .Sp
601 This option is particularly helpful when the input format is binary,
602 since this will always create a section called .data.  If for example,
603 you wanted instead to create a section called .rodata containing binary
604 data you could use the following command line to achieve it:
605 .Sp
606 .Vb 3
607 \&          objcopy \-I binary \-O <output_format> \-B <architecture> \e
608 \&           \-\-rename\-section .data=.rodata,alloc,load,readonly,data,contents \e
609 \&           <input_binary_file> <output_object_file>
610 .Ve
611 .IP "\fB\-\-long\-section\-names {enable,disable,keep}\fR" 4
612 .IX Item "--long-section-names {enable,disable,keep}"
613 Controls the handling of long section names when processing \f(CW\*(C`COFF\*(C'\fR
614 and \f(CW\*(C`PE\-COFF\*(C'\fR object formats.  The default behaviour, \fBkeep\fR,
615 is to preserve long section names if any are present in the input file.
616 The \fBenable\fR and \fBdisable\fR options forcibly enable or disable
617 the use of long section names in the output object; when \fBdisable\fR
618 is in effect, any long section names in the input object will be truncated.
619 The \fBenable\fR option will only emit long section names if any are
620 present in the inputs; this is mostly the same as \fBkeep\fR, but it
621 is left undefined whether the \fBenable\fR option might force the 
622 creation of an empty string table in the output file.
623 .IP "\fB\-\-change\-leading\-char\fR" 4
624 .IX Item "--change-leading-char"
625 Some object file formats use special characters at the start of
626 symbols.  The most common such character is underscore, which compilers
627 often add before every symbol.  This option tells \fBobjcopy\fR to
628 change the leading character of every symbol when it converts between
629 object file formats.  If the object file formats use the same leading
630 character, this option has no effect.  Otherwise, it will add a
631 character, or remove a character, or change a character, as
632 appropriate.
633 .IP "\fB\-\-remove\-leading\-char\fR" 4
634 .IX Item "--remove-leading-char"
635 If the first character of a global symbol is a special symbol leading
636 character used by the object file format, remove the character.  The
637 most common symbol leading character is underscore.  This option will
638 remove a leading underscore from all global symbols.  This can be useful
639 if you want to link together objects of different file formats with
640 different conventions for symbol names.  This is different from
641 \&\fB\-\-change\-leading\-char\fR because it always changes the symbol name
642 when appropriate, regardless of the object file format of the output
643 file.
644 .IP "\fB\-\-reverse\-bytes=\fR\fInum\fR" 4
645 .IX Item "--reverse-bytes=num"
646 Reverse the bytes in a section with output contents.  A section length must
647 be evenly divisible by the value given in order for the swap to be able to
648 take place. Reversing takes place before the interleaving is performed.
649 .Sp
650 This option is used typically in generating \s-1ROM\s0 images for problematic
651 target systems.  For example, on some target boards, the 32\-bit words
652 fetched from 8\-bit ROMs are re-assembled in little-endian byte order
653 regardless of the \s-1CPU\s0 byte order.  Depending on the programming model, the
654 endianness of the \s-1ROM\s0 may need to be modified.
655 .Sp
656 Consider a simple file with a section containing the following eight
657 bytes:  \f(CW12345678\fR.
658 .Sp
659 Using \fB\-\-reverse\-bytes=2\fR for the above example, the bytes in the
660 output file would be ordered \f(CW21436587\fR.
661 .Sp
662 Using \fB\-\-reverse\-bytes=4\fR for the above example, the bytes in the
663 output file would be ordered \f(CW43218765\fR.
664 .Sp
665 By using \fB\-\-reverse\-bytes=2\fR for the above example, followed by
666 \&\fB\-\-reverse\-bytes=4\fR on the output file, the bytes in the second
667 output file would be ordered \f(CW34127856\fR.
668 .IP "\fB\-\-srec\-len=\fR\fIival\fR" 4
669 .IX Item "--srec-len=ival"
670 Meaningful only for srec output.  Set the maximum length of the Srecords
671 being produced to \fIival\fR.  This length covers both address, data and
672 crc fields.
673 .IP "\fB\-\-srec\-forceS3\fR" 4
674 .IX Item "--srec-forceS3"
675 Meaningful only for srec output.  Avoid generation of S1/S2 records,
676 creating S3\-only record format.
677 .IP "\fB\-\-redefine\-sym\fR \fIold\fR\fB=\fR\fInew\fR" 4
678 .IX Item "--redefine-sym old=new"
679 Change the name of a symbol \fIold\fR, to \fInew\fR.  This can be useful
680 when one is trying link two things together for which you have no
681 source, and there are name collisions.
682 .IP "\fB\-\-redefine\-syms=\fR\fIfilename\fR" 4
683 .IX Item "--redefine-syms=filename"
684 Apply \fB\-\-redefine\-sym\fR to each symbol pair "\fIold\fR \fInew\fR"
685 listed in the file \fIfilename\fR.  \fIfilename\fR is simply a flat file,
686 with one symbol pair per line.  Line comments may be introduced by the hash
687 character.  This option may be given more than once.
688 .IP "\fB\-\-weaken\fR" 4
689 .IX Item "--weaken"
690 Change all global symbols in the file to be weak.  This can be useful
691 when building an object which will be linked against other objects using
692 the \fB\-R\fR option to the linker.  This option is only effective when
693 using an object file format which supports weak symbols.
694 .IP "\fB\-\-keep\-symbols=\fR\fIfilename\fR" 4
695 .IX Item "--keep-symbols=filename"
696 Apply \fB\-\-keep\-symbol\fR option to each symbol listed in the file
697 \&\fIfilename\fR.  \fIfilename\fR is simply a flat file, with one symbol
698 name per line.  Line comments may be introduced by the hash character.
699 This option may be given more than once.
700 .IP "\fB\-\-strip\-symbols=\fR\fIfilename\fR" 4
701 .IX Item "--strip-symbols=filename"
702 Apply \fB\-\-strip\-symbol\fR option to each symbol listed in the file
703 \&\fIfilename\fR.  \fIfilename\fR is simply a flat file, with one symbol
704 name per line.  Line comments may be introduced by the hash character.
705 This option may be given more than once.
706 .IP "\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR" 4
707 .IX Item "--strip-unneeded-symbols=filename"
708 Apply \fB\-\-strip\-unneeded\-symbol\fR option to each symbol listed in
709 the file \fIfilename\fR.  \fIfilename\fR is simply a flat file, with one
710 symbol name per line.  Line comments may be introduced by the hash
711 character.  This option may be given more than once.
712 .IP "\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR" 4
713 .IX Item "--keep-global-symbols=filename"
714 Apply \fB\-\-keep\-global\-symbol\fR option to each symbol listed in the
715 file \fIfilename\fR.  \fIfilename\fR is simply a flat file, with one
716 symbol name per line.  Line comments may be introduced by the hash
717 character.  This option may be given more than once.
718 .IP "\fB\-\-localize\-symbols=\fR\fIfilename\fR" 4
719 .IX Item "--localize-symbols=filename"
720 Apply \fB\-\-localize\-symbol\fR option to each symbol listed in the file
721 \&\fIfilename\fR.  \fIfilename\fR is simply a flat file, with one symbol
722 name per line.  Line comments may be introduced by the hash character.
723 This option may be given more than once.
724 .IP "\fB\-\-globalize\-symbols=\fR\fIfilename\fR" 4
725 .IX Item "--globalize-symbols=filename"
726 Apply \fB\-\-globalize\-symbol\fR option to each symbol listed in the file
727 \&\fIfilename\fR.  \fIfilename\fR is simply a flat file, with one symbol
728 name per line.  Line comments may be introduced by the hash character.
729 This option may be given more than once.
730 .IP "\fB\-\-weaken\-symbols=\fR\fIfilename\fR" 4
731 .IX Item "--weaken-symbols=filename"
732 Apply \fB\-\-weaken\-symbol\fR option to each symbol listed in the file
733 \&\fIfilename\fR.  \fIfilename\fR is simply a flat file, with one symbol
734 name per line.  Line comments may be introduced by the hash character.
735 This option may be given more than once.
736 .IP "\fB\-\-alt\-machine\-code=\fR\fIindex\fR" 4
737 .IX Item "--alt-machine-code=index"
738 If the output architecture has alternate machine codes, use the
739 \&\fIindex\fRth code instead of the default one.  This is useful in case
740 a machine is assigned an official code and the tool-chain adopts the
741 new code, but other applications still depend on the original code
742 being used.  For \s-1ELF\s0 based architectures if the \fIindex\fR
743 alternative does not exist then the value is treated as an absolute
744 number to be stored in the e_machine field of the \s-1ELF\s0 header.
745 .IP "\fB\-\-writable\-text\fR" 4
746 .IX Item "--writable-text"
747 Mark the output text as writable.  This option isn't meaningful for all
748 object file formats.
749 .IP "\fB\-\-readonly\-text\fR" 4
750 .IX Item "--readonly-text"
751 Make the output text write protected.  This option isn't meaningful for all
752 object file formats.
753 .IP "\fB\-\-pure\fR" 4
754 .IX Item "--pure"
755 Mark the output file as demand paged.  This option isn't meaningful for all
756 object file formats.
757 .IP "\fB\-\-impure\fR" 4
758 .IX Item "--impure"
759 Mark the output file as impure.  This option isn't meaningful for all
760 object file formats.
761 .IP "\fB\-\-prefix\-symbols=\fR\fIstring\fR" 4
762 .IX Item "--prefix-symbols=string"
763 Prefix all symbols in the output file with \fIstring\fR.
764 .IP "\fB\-\-prefix\-sections=\fR\fIstring\fR" 4
765 .IX Item "--prefix-sections=string"
766 Prefix all section names in the output file with \fIstring\fR.
767 .IP "\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR" 4
768 .IX Item "--prefix-alloc-sections=string"
769 Prefix all the names of all allocated sections in the output file with
770 \&\fIstring\fR.
771 .IP "\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR" 4
772 .IX Item "--add-gnu-debuglink=path-to-file"
773 Creates a .gnu_debuglink section which contains a reference to \fIpath-to-file\fR
774 and adds it to the output file.
775 .IP "\fB\-\-keep\-file\-symbols\fR" 4
776 .IX Item "--keep-file-symbols"
777 When stripping a file, perhaps with \fB\-\-strip\-debug\fR or
778 \&\fB\-\-strip\-unneeded\fR, retain any symbols specifying source file names,
779 which would otherwise get stripped.
780 .IP "\fB\-\-only\-keep\-debug\fR" 4
781 .IX Item "--only-keep-debug"
782 Strip a file, removing contents of any sections that would not be
783 stripped by \fB\-\-strip\-debug\fR and leaving the debugging sections
784 intact.  In \s-1ELF\s0 files, this preserves all note sections in the output.
785 .Sp
786 The intention is that this option will be used in conjunction with
787 \&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable.  One a
788 stripped binary which will occupy less space in \s-1RAM\s0 and in a
789 distribution and the second a debugging information file which is only
790 needed if debugging abilities are required.  The suggested procedure
791 to create these files is as follows:
792 .RS 4
793 .IP "1.<Link the executable as normal.  Assuming that is is called>" 4
794 .IX Item "1.<Link the executable as normal.  Assuming that is is called>"
795 \&\f(CW\*(C`foo\*(C'\fR then...
796 .ie n .IP "1.<Run ""objcopy \-\-only\-keep\-debug foo foo.dbg"" to>" 4
797 .el .IP "1.<Run \f(CWobjcopy \-\-only\-keep\-debug foo foo.dbg\fR to>" 4
798 .IX Item "1.<Run objcopy --only-keep-debug foo foo.dbg to>"
799 create a file containing the debugging info.
800 .ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"" to create a>" 4
801 .el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR to create a>" 4
802 .IX Item "1.<Run objcopy --strip-debug foo to create a>"
803 stripped executable.
804 .ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.dbg foo"">" 4
805 .el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.dbg foo\fR>" 4
806 .IX Item "1.<Run objcopy --add-gnu-debuglink=foo.dbg foo>"
807 to add a link to the debugging info into the stripped executable.
808 .RE
809 .RS 4
810 .Sp
811 Note\-\-\-the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
812 file is arbitrary.  Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is
813 optional.  You could instead do this:
814 .IP "1.<Link the executable as normal.>" 4
815 .IX Item "1.<Link the executable as normal.>"
816 .PD 0
817 .ie n .IP "1.<Copy ""foo""\fR to  \f(CW""foo.full"">" 4
818 .el .IP "1.<Copy \f(CWfoo\fR to  \f(CWfoo.full\fR>" 4
819 .IX Item "1.<Copy foo to  foo.full>"
820 .ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"">" 4
821 .el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR>" 4
822 .IX Item "1.<Run objcopy --strip-debug foo>"
823 .ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.full foo"">" 4
824 .el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.full foo\fR>" 4
825 .IX Item "1.<Run objcopy --add-gnu-debuglink=foo.full foo>"
826 .RE
827 .RS 4
828 .PD
829 .Sp
830 i.e., the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
831 full executable.  It does not have to be a file created by the
832 \&\fB\-\-only\-keep\-debug\fR switch.
833 .Sp
834 Note\-\-\-this switch is only intended for use on fully linked files.  It
835 does not make sense to use it on object files where the debugging
836 information may be incomplete.  Besides the gnu_debuglink feature
837 currently only supports the presence of one filename containing
838 debugging information, not multiple filenames on a one-per-object-file
839 basis.
840 .RE
841 .IP "\fB\-\-file\-alignment\fR \fInum\fR" 4
842 .IX Item "--file-alignment num"
843 Specify the file alignment.  Sections in the file will always begin at
844 file offsets which are multiples of this number.  This defaults to
845 512.
846 [This option is specific to \s-1PE\s0 targets.]
847 .IP "\fB\-\-heap\fR \fIreserve\fR" 4
848 .IX Item "--heap reserve"
849 .PD 0
850 .IP "\fB\-\-heap\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
851 .IX Item "--heap reserve,commit"
852 .PD
853 Specify the number of bytes of memory to reserve (and optionally commit)
854 to be used as heap for this program.
855 [This option is specific to \s-1PE\s0 targets.]
856 .IP "\fB\-\-image\-base\fR \fIvalue\fR" 4
857 .IX Item "--image-base value"
858 Use \fIvalue\fR as the base address of your program or dll.  This is
859 the lowest memory location that will be used when your program or dll
860 is loaded.  To reduce the need to relocate and improve performance of
861 your dlls, each should have a unique base address and not overlap any
862 other dlls.  The default is 0x400000 for executables, and 0x10000000
863 for dlls.
864 [This option is specific to \s-1PE\s0 targets.]
865 .IP "\fB\-\-section\-alignment\fR \fInum\fR" 4
866 .IX Item "--section-alignment num"
867 Sets the section alignment.  Sections in memory will always begin at
868 addresses which are a multiple of this number.  Defaults to 0x1000.
869 [This option is specific to \s-1PE\s0 targets.]
870 .IP "\fB\-\-stack\fR \fIreserve\fR" 4
871 .IX Item "--stack reserve"
872 .PD 0
873 .IP "\fB\-\-stack\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
874 .IX Item "--stack reserve,commit"
875 .PD
876 Specify the number of bytes of memory to reserve (and optionally commit)
877 to be used as stack for this program.
878 [This option is specific to \s-1PE\s0 targets.]
879 .IP "\fB\-\-subsystem\fR \fIwhich\fR" 4
880 .IX Item "--subsystem which"
881 .PD 0
882 .IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR" 4
883 .IX Item "--subsystem which:major"
884 .IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR\fB.\fR\fIminor\fR" 4
885 .IX Item "--subsystem which:major.minor"
886 .PD
887 Specifies the subsystem under which your program will execute.  The
888 legal values for \fIwhich\fR are \f(CW\*(C`native\*(C'\fR, \f(CW\*(C`windows\*(C'\fR,
889 \&\f(CW\*(C`console\*(C'\fR, \f(CW\*(C`posix\*(C'\fR, \f(CW\*(C`efi\-app\*(C'\fR, \f(CW\*(C`efi\-bsd\*(C'\fR,
890 \&\f(CW\*(C`efi\-rtd\*(C'\fR, \f(CW\*(C`sal\-rtd\*(C'\fR, and \f(CW\*(C`xbox\*(C'\fR.  You may optionally set
891 the subsystem version also.  Numeric values are also accepted for
892 \&\fIwhich\fR.
893 [This option is specific to \s-1PE\s0 targets.]
894 .IP "\fB\-\-extract\-symbol\fR" 4
895 .IX Item "--extract-symbol"
896 Keep the file's section flags and symbols but remove all section data.
897 Specifically, the option:
898 .RS 4
899 .IP "*<removes the contents of all sections;>" 4
900 .IX Item "*<removes the contents of all sections;>"
901 .PD 0
902 .IP "*<sets the size of every section to zero; and>" 4
903 .IX Item "*<sets the size of every section to zero; and>"
904 .IP "*<sets the file's start address to zero.>" 4
905 .IX Item "*<sets the file's start address to zero.>"
906 .RE
907 .RS 4
908 .PD
909 .Sp
910 This option is used to build a \fI.sym\fR file for a VxWorks kernel.
911 It can also be a useful way of reducing the size of a \fB\-\-just\-symbols\fR
912 linker input file.
913 .RE
914 .IP "\fB\-\-compress\-debug\-sections\fR" 4
915 .IX Item "--compress-debug-sections"
916 Compress \s-1DWARF\s0 debug sections using zlib.
917 .IP "\fB\-\-decompress\-debug\-sections\fR" 4
918 .IX Item "--decompress-debug-sections"
919 Decompress \s-1DWARF\s0 debug sections using zlib.
920 .IP "\fB\-V\fR" 4
921 .IX Item "-V"
922 .PD 0
923 .IP "\fB\-\-version\fR" 4
924 .IX Item "--version"
925 .PD
926 Show the version number of \fBobjcopy\fR.
927 .IP "\fB\-v\fR" 4
928 .IX Item "-v"
929 .PD 0
930 .IP "\fB\-\-verbose\fR" 4
931 .IX Item "--verbose"
932 .PD
933 Verbose output: list all object files modified.  In the case of
934 archives, \fBobjcopy \-V\fR lists all members of the archive.
935 .IP "\fB\-\-help\fR" 4
936 .IX Item "--help"
937 Show a summary of the options to \fBobjcopy\fR.
938 .IP "\fB\-\-info\fR" 4
939 .IX Item "--info"
940 Display a list showing all architectures and object formats available.
941 .IP "\fB@\fR\fIfile\fR" 4
942 .IX Item "@file"
943 Read command-line options from \fIfile\fR.  The options read are
944 inserted in place of the original @\fIfile\fR option.  If \fIfile\fR
945 does not exist, or cannot be read, then the option will be treated
946 literally, and not removed.
947 .Sp
948 Options in \fIfile\fR are separated by whitespace.  A whitespace
949 character may be included in an option by surrounding the entire
950 option in either single or double quotes.  Any character (including a
951 backslash) may be included by prefixing the character to be included
952 with a backslash.  The \fIfile\fR may itself contain additional
953 @\fIfile\fR options; any such options will be processed recursively.
954 .SH "SEE ALSO"
955 .IX Header "SEE ALSO"
956 \&\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
957 .SH "COPYRIGHT"
958 .IX Header "COPYRIGHT"
959 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
960 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
961 Free Software Foundation, Inc.
962 .PP
963 Permission is granted to copy, distribute and/or modify this document
964 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
965 or any later version published by the Free Software Foundation;
966 with no Invariant Sections, with no Front-Cover Texts, and with no
967 Back-Cover Texts.  A copy of the license is included in the
968 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".