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