OpenCores
URL https://opencores.org/ocsvn/altor32/altor32/trunk

Subversion Repositories altor32

[/] [altor32/] [trunk/] [gcc-x64/] [or1knd-elf/] [share/] [man/] [man1/] [or1k-elf-objcopy.1] - Blame information for rev 35

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.