aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.1
blob: 2e52d08c6735df5111266c2ad2dd2c05d8a975ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
.rn '' }`
''' $RCSfile$$Revision$$Date$
'''
''' $Log$
''' Revision 1.10  2001/03/25 20:32:25  nickc
''' Automate generate on man pages
'''
'''
.de Sh
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp
.if t .sp .5v
.if n .sp
..
.de Ip
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb
.ft CW
.nf
.ne \\$1
..
.de Ve
.ft R

.fi
..
'''
'''
'''     Set up \*(-- to give an unbreakable dash;
'''     string Tr holds user defined translation string.
'''     Bell System Logo is used as a dummy character.
'''
.tr \(*W-|\(bv\*(Tr
.ie n \{\
.ds -- \(*W-
.ds PI pi
.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
.ds L" ""
.ds R" ""
'''   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
'''   \*(L" and \*(R", except that they are used on ".xx" lines,
'''   such as .IP and .SH, which do another additional levels of
'''   double-quote interpretation
.ds M" """
.ds S" """
.ds N" """""
.ds T" """""
.ds L' '
.ds R' '
.ds M' '
.ds S' '
.ds N' '
.ds T' '
'br\}
.el\{\
.ds -- \(em\|
.tr \*(Tr
.ds L" ``
.ds R" ''
.ds M" ``
.ds S" ''
.ds N" ``
.ds T" ''
.ds L' `
.ds R' '
.ds M' `
.ds S' '
.ds N' `
.ds T' '
.ds PI \(*p
'br\}
.\"	If the F register is turned on, we'll generate
.\"	index entries out stderr for the following things:
.\"		TH	Title 
.\"		SH	Header
.\"		Sh	Subsection 
.\"		Ip	Item
.\"		X<>	Xref  (embedded
.\"	Of course, you have to process the output yourself
.\"	in some meaninful fashion.
.if \nF \{
.de IX
.tm Index:\\$1\t\\n%\t"\\$2"
..
.nr % 0
.rr F
.\}
.TH OBJCOPY.1 1 "binutils-2.11.90" "23/Mar/101" "GNU"
.UC
.if n .hy 0
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.de CQ          \" put $1 in typewriter font
.ft CW
'if n "\c
'if t \\&\\$1\c
'if n \\&\\$1\c
'if n \&"
\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
'.ft R
..
.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
.	\" AM - accent mark definitions
.bd B 3
.	\" fudge factors for nroff and troff
.if n \{\
.	ds #H 0
.	ds #V .8m
.	ds #F .3m
.	ds #[ \f1
.	ds #] \fP
.\}
.if t \{\
.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.	ds #V .6m
.	ds #F 0
.	ds #[ \&
.	ds #] \&
.\}
.	\" simple accents for nroff and troff
.if n \{\
.	ds ' \&
.	ds ` \&
.	ds ^ \&
.	ds , \&
.	ds ~ ~
.	ds ? ?
.	ds ! !
.	ds /
.	ds q
.\}
.if t \{\
.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
.\}
.	\" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.ds oe o\h'-(\w'o'u*4/10)'e
.ds Oe O\h'-(\w'O'u*4/10)'E
.	\" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.	\" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.	ds : e
.	ds 8 ss
.	ds v \h'-1'\o'\(aa\(ga'
.	ds _ \h'-1'^
.	ds . \h'-1'.
.	ds 3 3
.	ds o a
.	ds d- d\h'-1'\(ga
.	ds D- D\h'-1'\(hy
.	ds th \o'bp'
.	ds Th \o'LP'
.	ds ae ae
.	ds Ae AE
.	ds oe oe
.	ds Oe OE
.\}
.rm #[ #] #H #V #F C
.SH "NAME"
objcopy \- copy and translate object files
.SH "SYNOPSIS"
objcopy [ \-F \fIbfdname\fR | --target=\fIbfdname\fR ]
        [ \-I \fIbfdname\fR | --input-target=\fIbfdname\fR ]
        [ \-O \fIbfdname\fR | --output-target=\fIbfdname\fR ]
        [ \-B \fIbfdarch\fR | --binary-architecture=\fIbfdarch\fR ]
        [ \-S | --strip-all ]  [ \-g | --strip-debug ]
        [ \-K \fIsymbolname\fR | --keep-symbol=\fIsymbolname\fR ]
        [ \-N \fIsymbolname\fR | --strip-symbol=\fIsymbolname\fR ]
        [ \-L \fIsymbolname\fR | --localize-symbol=\fIsymbolname\fR ]
        [ \-W \fIsymbolname\fR | --weaken-symbol=\fIsymbolname\fR ]
        [ \-x | --discard-all ]  [ \-X | --discard-locals ]
        [ \-b \fIbyte\fR | --byte=\fIbyte\fR ]
        [ \-i \fIinterleave\fR | --interleave=\fIinterleave\fR ]
        [ \-j \fIsectionname\fR | --only-section=\fIsectionname\fR ]
        [ \-R \fIsectionname\fR | --remove-section=\fIsectionname\fR ]
        [ \-p | --preserve-dates ] [ --debugging ]
        [ --gap-fill=\fIval\fR ] [ --pad-to=\fIaddress\fR ]
        [ --set-start=\fIval\fR ] [ --adjust-start=\fIincr\fR ]
        [ --change-addresses=\fIincr\fR ]
        [ --change-section-address \fIsection\fR{=,+,\-}\fIval\fR ]
        [ --change-section-lma \fIsection\fR{=,+,\-}\fIval\fR ]
        [ --change-section-vma \fIsection\fR{=,+,\-}\fIval\fR ]
        [ --change-warnings ] [ --no-change-warnings ]
        [ --set-section-flags \fIsection\fR=\fIflags\fR ]
        [ --add-section \fIsectionname\fR=\fIfilename\fR ]
        [ --change-leading-char ] [ --remove-leading-char ]
        [ --srec-len=\fIival\fR ] [ --srec-forceS3 ]
        [ --redefine-sym \fIold\fR=\fInew\fR ] [ --weaken ]
        [ \-v | --verbose ] [ \-V | --version ]  [ --help ]
        \fIinfile\fR [\fIoutfile\fR]
.SH "DESCRIPTION"
The GNU \f(CWobjcopy\fR utility copies the contents of an object
file to another.  \f(CWobjcopy\fR uses the GNU BFD Library to
read and write the object files.  It can write the destination object
file in a format different from that of the source object file.  The
exact behavior of \f(CWobjcopy\fR is controlled by command-line options.
Note that \f(CWobjcopy\fR should be able to copy a fully linked file
between any two formats. However, copying a relocatable object file
between any two formats may not work as expected.
.PP
\f(CWobjcopy\fR creates temporary files to do its translations and
deletes them afterward.  \f(CWobjcopy\fR uses BFD to do all its
translation work; it has access to all the formats described in BFD
and thus is able to recognize most formats without being told
explicitly.  
.PP
\f(CWobjcopy\fR can be used to generate S\-records by using an output
target of \fBsrec\fR (e.g., use \fB\-O srec\fR).
.PP
\f(CWobjcopy\fR can be used to generate a raw binary file by using an
output target of \fBbinary\fR (e.g., use \fB\-O binary\fR).  When
\f(CWobjcopy\fR generates a raw binary file, it will essentially produce
a memory dump of the contents of the input object file.  All symbols and
relocation information will be discarded.  The memory dump will start at
the load address of the lowest section copied into the output file.
.PP
When generating an S\-record or a raw binary file, it may be helpful to
use \fB\-S\fR to remove sections containing debugging information.  In
some cases \fB\-R\fR will be useful to remove sections which contain
information that is not needed by the binary file.
.PP
Note \- \f(CWobjcopy\fR is not able to change the endianness of its input
files.  If the input format has an endianness, (some formats do not),
\f(CWobjcopy\fR can only copy the inputs into file formats that have the
same endianness or which have no endianness (eg \fBsrec\fR).
.SH "OPTIONS"
.Ip "\f(CW\fIinfile\fR\fR" 4
.Ip "\f(CW\fIoutfile\fR\fR" 4
The input and output files, respectively.
If you do not specify \fIoutfile\fR, \f(CWobjcopy\fR creates a
temporary file and destructively renames the result with
the name of \fIinfile\fR.
.Ip "\f(CW-I \fIbfdname\fR	\fR" 4
.Ip "\f(CW--input-target=\fIbfdname\fR\fR" 4
Consider the source file's object format to be \fIbfdname\fR, rather than
attempting to deduce it.  
.Ip "\f(CW-O \fIbfdname\fR\fR" 4
.Ip "\f(CW--output-target=\fIbfdname\fR\fR" 4
Write the output file using the object format \fIbfdname\fR.
.Ip "\f(CW-F \fIbfdname\fR\fR" 4
.Ip "\f(CW--target=\fIbfdname\fR\fR" 4
Use \fIbfdname\fR as the object format for both the input and the output
file; i.e., simply transfer data from source to destination with no
translation.  
.Ip "\f(CW-B \fIbfdarch\fR\fR" 4
.Ip "\f(CW--binary-architecture=\fIbfdarch\fR\fR" 4
Useful when transforming a raw binary input file into an object file.
In this case the output architecture can be set to \fIbfdarch\fR. This
option will be ignored if the input file has a known \fIbfdarch\fR. You
can access this binary data inside a program by referencing the special
symbols that are created by the conversion process.  These symbols are
called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and
_binary_\fIobjfile\fR_size.  e.g. you can transform a picture file into
an object file and then access it in your code using these symbols. 
.Ip "\f(CW-j \fIsectionname\fR\fR" 4
.Ip "\f(CW--only-section=\fIsectionname\fR\fR" 4
Copy only the named section from the input file to the output file.
This option may be given more than once.  Note that using this option
inappropriately may make the output file unusable.
.Ip "\f(CW-R \fIsectionname\fR\fR" 4
.Ip "\f(CW--remove-section=\fIsectionname\fR\fR" 4
Remove any section named \fIsectionname\fR from the output file.  This
option may be given more than once.  Note that using this option
inappropriately may make the output file unusable.
.Ip "\f(CW-S\fR" 4
.Ip "\f(CW--strip-all\fR" 4
Do not copy relocation and symbol information from the source file.
.Ip "\f(CW-g\fR" 4
.Ip "\f(CW--strip-debug\fR" 4
Do not copy debugging symbols from the source file.
.Ip "\f(CW--strip-unneeded\fR" 4
Strip all symbols that are not needed for relocation processing.
.Ip "\f(CW-K \fIsymbolname\fR\fR" 4
.Ip "\f(CW--keep-symbol=\fIsymbolname\fR\fR" 4
Copy only symbol \fIsymbolname\fR from the source file.  This option may
be given more than once.
.Ip "\f(CW-N \fIsymbolname\fR\fR" 4
.Ip "\f(CW--strip-symbol=\fIsymbolname\fR\fR" 4
Do not copy symbol \fIsymbolname\fR from the source file.  This option
may be given more than once.
.Ip "\f(CW-L \fIsymbolname\fR\fR" 4
.Ip "\f(CW--localize-symbol=\fIsymbolname\fR\fR" 4
Make symbol \fIsymbolname\fR local to the file, so that it is not
visible externally.  This option may be given more than once.
.Ip "\f(CW-W \fIsymbolname\fR\fR" 4
.Ip "\f(CW--weaken-symbol=\fIsymbolname\fR\fR" 4
Make symbol \fIsymbolname\fR weak. This option may be given more than once.
.Ip "\f(CW-x\fR" 4
.Ip "\f(CW--discard-all\fR" 4
Do not copy non-global symbols from the source file.
.Ip "\f(CW-X\fR" 4
.Ip "\f(CW--discard-locals\fR" 4
Do not copy compiler-generated local symbols.
(These usually start with \fBL\fR or \fB.\fR.)
.Ip "\f(CW-b \fIbyte\fR\fR" 4
.Ip "\f(CW--byte=\fIbyte\fR\fR" 4
Keep only every \fIbyte\fRth byte of the input file (header data is not
affected).  \fIbyte\fR can be in the range from 0 to \fIinterleave\fR\-1,
where \fIinterleave\fR is given by the \fB\-i\fR or \fB--interleave\fR
option, or the default of 4.  This option is useful for creating files
to program \s-1ROM\s0.  It is typically used with an \f(CWsrec\fR output
target.
.Ip "\f(CW-i \fIinterleave\fR\fR" 4
.Ip "\f(CW--interleave=\fIinterleave\fR\fR" 4
Only copy one out of every \fIinterleave\fR bytes.  Select which byte to
copy with the \fI\-b\fR or \fB--byte\fR option.  The default is 4.
\f(CWobjcopy\fR ignores this option if you do not specify either \fB\-b\fR or
\fB--byte\fR.
.Ip "\f(CW-p\fR" 4
.Ip "\f(CW--preserve-dates\fR" 4
Set the access and modification dates of the output file to be the same
as those of the input file.
.Ip "\f(CW--debugging\fR" 4
Convert debugging information, if possible.  This is not the default
because only certain debugging formats are supported, and the
conversion process can be time consuming.
.Ip "\f(CW--gap-fill \fIval\fR\fR" 4
Fill gaps between sections with \fIval\fR.  This operation applies to
the \fIload address\fR (\s-1LMA\s0) of the sections.  It is done by increasing
the size of the section with the lower address, and filling in the extra
space created with \fIval\fR.
.Ip "\f(CW--pad-to \fIaddress\fR\fR" 4
Pad the output file up to the load address \fIaddress\fR.  This is
done by increasing the size of the last section.  The extra space is
filled in with the value specified by \fB--gap-fill\fR (default zero).
.Ip "\f(CW--set-start \fIval\fR\fR" 4
Set the start address of the new file to \fIval\fR.  Not all object file
formats support setting the start address.
.Ip "\f(CW--change-start \fIincr\fR\fR" 4
.Ip "\f(CW--adjust-start \fIincr\fR\fR" 4
Change the start address by adding \fIincr\fR.  Not all object file
formats support setting the start address.
.Ip "\f(CW--change-addresses \fIincr\fR\fR" 4
.Ip "\f(CW--adjust-vma \fIincr\fR\fR" 4
Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start
address, by adding \fIincr\fR.  Some object file formats do not permit
section addresses to be changed arbitrarily.  Note that this does not
relocate the sections; if the program expects sections to be loaded at a
certain address, and this option is used to change the sections such
that they are loaded at a different address, the program may fail. 
.Ip "\f(CW--change-section-address \fIsection\fR{=,+,-}\fIval\fR\fR" 4
.Ip "\f(CW--adjust-section-vma \fIsection\fR{=,+,-}\fIval\fR\fR" 4
Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named
\fIsection\fR.  If \fB=\fR is used, the section address is set to
\fIval\fR.  Otherwise, \fIval\fR is added to or subtracted from the
section address.  See the comments under \fB--change-addresses\fR,
above. If \fIsection\fR does not exist in the input file, a warning will
be issued, unless \fB--no-change-warnings\fR is used.
.Ip "\f(CW--change-section-lma \fIsection\fR{=,+,-}\fIval\fR\fR" 4
Set or change the \s-1LMA\s0 address of the named \fIsection\fR.  The \s-1LMA\s0
address is the address where the section will be loaded into memory at
program load time.  Normally this is the same as the \s-1VMA\s0 address, which
is the address of the section at program run time, but on some systems,
especially those where a program is held in \s-1ROM\s0, the two can be
different.  If \fB=\fR is used, the section address is set to
\fIval\fR.  Otherwise, \fIval\fR is added to or subtracted from the
section address.  See the comments under \fB--change-addresses\fR,
above.  If \fIsection\fR does not exist in the input file, a warning
will be issued, unless \fB--no-change-warnings\fR is used.  
.Ip "\f(CW--change-section-vma \fIsection\fR{=,+,-}\fIval\fR\fR" 4
Set or change the \s-1VMA\s0 address of the named \fIsection\fR.  The \s-1VMA\s0
address is the address where the section will be located once the
program has started executing.  Normally this is the same as the \s-1LMA\s0
address, which is the address where the section will be loaded into
memory, but on some systems, especially those where a program is held in
\s-1ROM\s0, the two can be different.  If \fB=\fR is used, the section address
is set to \fIval\fR.  Otherwise, \fIval\fR is added to or subtracted
from the section address.  See the comments under
\fB--change-addresses\fR, above.  If \fIsection\fR does not exist in
the input file, a warning will be issued, unless
\fB--no-change-warnings\fR is used.   
.Ip "\f(CW--change-warnings\fR" 4
.Ip "\f(CW--adjust-warnings\fR" 4
If \fB--change-section-address\fR or \fB--change-section-lma\fR or
\fB--change-section-vma\fR is used, and the named section does not
exist, issue a warning.  This is the default. 
.Ip "\f(CW--no-change-warnings\fR" 4
.Ip "\f(CW--no-adjust-warnings\fR" 4
Do not issue a warning if \fB--change-section-address\fR or
\fB--adjust-section-lma\fR or \fB--adjust-section-vma\fR is used, even
if the named section does not exist. 
.Ip "\f(CW--set-section-flags \fIsection\fR=\fIflags\fR\fR" 4
Set the flags for the named section.  The \fIflags\fR argument is a
comma separated string of flag names.  The recognized names are
\fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR,
\fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, \fBshare\fR, and
\fBdebug\fR.  You can set the \fBcontents\fR flag for a section which
does not have contents, but it is not meaningful to clear the
\fBcontents\fR flag of a section which does have contents\*(--just remove
the section instead.  Not all flags are meaningful for all object file
formats.
.Ip "\f(CW--add-section \fIsectionname\fR=\fIfilename\fR\fR" 4
Add a new section named \fIsectionname\fR while copying the file.  The
contents of the new section are taken from the file \fIfilename\fR.  The
size of the section will be the size of the file.  This option only
works on file formats which can support sections with arbitrary names.
.Ip "\f(CW--change-leading-char\fR" 4
Some object file formats use special characters at the start of
symbols.  The most common such character is underscore, which compilers
often add before every symbol.  This option tells \f(CWobjcopy\fR to
change the leading character of every symbol when it converts between
object file formats.  If the object file formats use the same leading
character, this option has no effect.  Otherwise, it will add a
character, or remove a character, or change a character, as
appropriate.
.Ip "\f(CW--remove-leading-char\fR" 4
If the first character of a global symbol is a special symbol leading
character used by the object file format, remove the character.  The
most common symbol leading character is underscore.  This option will
remove a leading underscore from all global symbols.  This can be useful
if you want to link together objects of different file formats with
different conventions for symbol names.  This is different from
\f(CW--change-leading-char\fR because it always changes the symbol name
when appropriate, regardless of the object file format of the output
file.
.Ip "\f(CW--srec-len=\fIival\fR\fR" 4
Meaningful only for srec output.  Set the maximum length of the Srecords
being produced to \fIival\fR.  This length covers both address, data and
crc fields.
.Ip "\f(CW--srec-forceS3\fR" 4
Meaningful only for srec output.  Avoid generation of S1/S2 records, 
creating S3-only record format.
.Ip "\f(CW--redefine-sym \fIold\fR=\fInew\fR\fR" 4
Change the name of a symbol \fIold\fR, to \fInew\fR.  This can be useful
when one is trying link two things together for which you have no
source, and there are name collisions.
.Ip "\f(CW--weaken\fR" 4
Change all global symbols in the file to be weak.  This can be useful
when building an object which will be linked against other objects using
the \f(CW-R\fR option to the linker.  This option is only effective when
using an object file format which supports weak symbols.
.Ip "\f(CW-V\fR" 4
.Ip "\f(CW--version\fR" 4
Show the version number of \f(CWobjcopy\fR.
.Ip "\f(CW-v\fR" 4
.Ip "\f(CW--verbose\fR" 4
Verbose output: list all object files modified.  In the case of
archives, \fBobjcopy \-V\fR lists all members of the archive.
.Ip "\f(CW--help\fR" 4
Show a summary of the options to \f(CWobjcopy\fR.
.SH "SEE ALSO"
\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts.  A copy of the license is included in the
section entitled \*(L"GNU Free Documentation License\*(R".

.rn }` ''
.IX Title "OBJCOPY.1 1"
.IX Name "objcopy - copy and translate object files"

.IX Header "NAME"

.IX Header "SYNOPSIS"

.IX Header "DESCRIPTION"

.IX Header "OPTIONS"

.IX Item "\f(CW\fIinfile\fR\fR"

.IX Item "\f(CW\fIoutfile\fR\fR"

.IX Item "\f(CW-I \fIbfdname\fR	\fR"

.IX Item "\f(CW--input-target=\fIbfdname\fR\fR"

.IX Item "\f(CW-O \fIbfdname\fR\fR"

.IX Item "\f(CW--output-target=\fIbfdname\fR\fR"

.IX Item "\f(CW-F \fIbfdname\fR\fR"

.IX Item "\f(CW--target=\fIbfdname\fR\fR"

.IX Item "\f(CW-B \fIbfdarch\fR\fR"

.IX Item "\f(CW--binary-architecture=\fIbfdarch\fR\fR"

.IX Item "\f(CW-j \fIsectionname\fR\fR"

.IX Item "\f(CW--only-section=\fIsectionname\fR\fR"

.IX Item "\f(CW-R \fIsectionname\fR\fR"

.IX Item "\f(CW--remove-section=\fIsectionname\fR\fR"

.IX Item "\f(CW-S\fR"

.IX Item "\f(CW--strip-all\fR"

.IX Item "\f(CW-g\fR"

.IX Item "\f(CW--strip-debug\fR"

.IX Item "\f(CW--strip-unneeded\fR"

.IX Item "\f(CW-K \fIsymbolname\fR\fR"

.IX Item "\f(CW--keep-symbol=\fIsymbolname\fR\fR"

.IX Item "\f(CW-N \fIsymbolname\fR\fR"

.IX Item "\f(CW--strip-symbol=\fIsymbolname\fR\fR"

.IX Item "\f(CW-L \fIsymbolname\fR\fR"

.IX Item "\f(CW--localize-symbol=\fIsymbolname\fR\fR"

.IX Item "\f(CW-W \fIsymbolname\fR\fR"

.IX Item "\f(CW--weaken-symbol=\fIsymbolname\fR\fR"

.IX Item "\f(CW-x\fR"

.IX Item "\f(CW--discard-all\fR"

.IX Item "\f(CW-X\fR"

.IX Item "\f(CW--discard-locals\fR"

.IX Item "\f(CW-b \fIbyte\fR\fR"

.IX Item "\f(CW--byte=\fIbyte\fR\fR"

.IX Item "\f(CW-i \fIinterleave\fR\fR"

.IX Item "\f(CW--interleave=\fIinterleave\fR\fR"

.IX Item "\f(CW-p\fR"

.IX Item "\f(CW--preserve-dates\fR"

.IX Item "\f(CW--debugging\fR"

.IX Item "\f(CW--gap-fill \fIval\fR\fR"

.IX Item "\f(CW--pad-to \fIaddress\fR\fR"

.IX Item "\f(CW--set-start \fIval\fR\fR"

.IX Item "\f(CW--change-start \fIincr\fR\fR"

.IX Item "\f(CW--adjust-start \fIincr\fR\fR"

.IX Item "\f(CW--change-addresses \fIincr\fR\fR"

.IX Item "\f(CW--adjust-vma \fIincr\fR\fR"

.IX Item "\f(CW--change-section-address \fIsection\fR{=,+,-}\fIval\fR\fR"

.IX Item "\f(CW--adjust-section-vma \fIsection\fR{=,+,-}\fIval\fR\fR"

.IX Item "\f(CW--change-section-lma \fIsection\fR{=,+,-}\fIval\fR\fR"

.IX Item "\f(CW--change-section-vma \fIsection\fR{=,+,-}\fIval\fR\fR"

.IX Item "\f(CW--change-warnings\fR"

.IX Item "\f(CW--adjust-warnings\fR"

.IX Item "\f(CW--no-change-warnings\fR"

.IX Item "\f(CW--no-adjust-warnings\fR"

.IX Item "\f(CW--set-section-flags \fIsection\fR=\fIflags\fR\fR"

.IX Item "\f(CW--add-section \fIsectionname\fR=\fIfilename\fR\fR"

.IX Item "\f(CW--change-leading-char\fR"

.IX Item "\f(CW--remove-leading-char\fR"

.IX Item "\f(CW--srec-len=\fIival\fR\fR"

.IX Item "\f(CW--srec-forceS3\fR"

.IX Item "\f(CW--redefine-sym \fIold\fR=\fInew\fR\fR"

.IX Item "\f(CW--weaken\fR"

.IX Item "\f(CW-V\fR"

.IX Item "\f(CW--version\fR"

.IX Item "\f(CW-v\fR"

.IX Item "\f(CW--verbose\fR"

.IX Item "\f(CW--help\fR"

.IX Header "SEE ALSO"

.IX Header "COPYRIGHT"