1OBJCOPY(1) GNU Development Tools OBJCOPY(1)
2
3
4
6 objcopy - copy and translate object files
7
9 objcopy [-F bfdname|--target=bfdname]
10 [-I bfdname|--input-target=bfdname]
11 [-O bfdname|--output-target=bfdname]
12 [-B bfdarch|--binary-architecture=bfdarch]
13 [-S|--strip-all]
14 [-g|--strip-debug]
15 [-K symbolname|--keep-symbol=symbolname]
16 [-N symbolname|--strip-symbol=symbolname]
17 [--strip-unneeded-symbol=symbolname]
18 [-G symbolname|--keep-global-symbol=symbolname]
19 [--localize-hidden]
20 [-L symbolname|--localize-symbol=symbolname]
21 [--globalize-symbol=symbolname]
22 [-W symbolname|--weaken-symbol=symbolname]
23 [-w|--wildcard]
24 [-x|--discard-all]
25 [-X|--discard-locals]
26 [-b byte|--byte=byte]
27 [-i [breadth]|--interleave[=breadth]]
28 [--interleave-width=width]
29 [-j sectionpattern|--only-section=sectionpattern]
30 [-R sectionpattern|--remove-section=sectionpattern]
31 [-p|--preserve-dates]
32 [-D|--enable-deterministic-archives]
33 [-U|--disable-deterministic-archives]
34 [--debugging]
35 [--gap-fill=val]
36 [--pad-to=address]
37 [--set-start=val]
38 [--adjust-start=incr]
39 [--change-addresses=incr]
40 [--change-section-address sectionpattern{=,+,-}val]
41 [--change-section-lma sectionpattern{=,+,-}val]
42 [--change-section-vma sectionpattern{=,+,-}val]
43 [--change-warnings] [--no-change-warnings]
44 [--set-section-flags sectionpattern=flags]
45 [--add-section sectionname=filename]
46 [--rename-section oldname=newname[,flags]]
47 [--long-section-names {enable,disable,keep}]
48 [--change-leading-char] [--remove-leading-char]
49 [--reverse-bytes=num]
50 [--srec-len=ival] [--srec-forceS3]
51 [--redefine-sym old=new]
52 [--redefine-syms=filename]
53 [--weaken]
54 [--keep-symbols=filename]
55 [--strip-symbols=filename]
56 [--strip-unneeded-symbols=filename]
57 [--keep-global-symbols=filename]
58 [--localize-symbols=filename]
59 [--globalize-symbols=filename]
60 [--weaken-symbols=filename]
61 [--alt-machine-code=index]
62 [--prefix-symbols=string]
63 [--prefix-sections=string]
64 [--prefix-alloc-sections=string]
65 [--add-gnu-debuglink=path-to-file]
66 [--keep-file-symbols]
67 [--only-keep-debug]
68 [--strip-dwo]
69 [--extract-dwo]
70 [--extract-symbol]
71 [--writable-text]
72 [--readonly-text]
73 [--pure]
74 [--impure]
75 [--file-alignment=num]
76 [--heap=size]
77 [--image-base=address]
78 [--section-alignment=num]
79 [--stack=size]
80 [--subsystem=which:major.minor]
81 [--compress-debug-sections]
82 [--decompress-debug-sections]
83 [--dwarf-depth=n]
84 [--dwarf-start=n]
85 [-v|--verbose]
86 [-V|--version]
87 [--help] [--info]
88 infile [outfile]
89
91 The GNU objcopy utility copies the contents of an object file to
92 another. objcopy uses the GNU BFD Library to read and write the object
93 files. It can write the destination object file in a format different
94 from that of the source object file. The exact behavior of objcopy is
95 controlled by command-line options. Note that objcopy should be able
96 to copy a fully linked file between any two formats. However, copying a
97 relocatable object file between any two formats may not work as
98 expected.
99
100 objcopy creates temporary files to do its translations and deletes them
101 afterward. objcopy uses BFD to do all its translation work; it has
102 access to all the formats described in BFD and thus is able to
103 recognize most formats without being told explicitly.
104
105 objcopy can be used to generate S-records by using an output target of
106 srec (e.g., use -O srec).
107
108 objcopy can be used to generate a raw binary file by using an output
109 target of binary (e.g., use -O binary). When objcopy generates a raw
110 binary file, it will essentially produce a memory dump of the contents
111 of the input object file. All symbols and relocation information will
112 be discarded. The memory dump will start at the load address of the
113 lowest section copied into the output file.
114
115 When generating an S-record or a raw binary file, it may be helpful to
116 use -S to remove sections containing debugging information. In some
117 cases -R will be useful to remove sections which contain information
118 that is not needed by the binary file.
119
120 Note---objcopy is not able to change the endianness of its input files.
121 If the input format has an endianness (some formats do not), objcopy
122 can only copy the inputs into file formats that have the same
123 endianness or which have no endianness (e.g., srec). (However, see the
124 --reverse-bytes option.)
125
127 infile
128 outfile
129 The input and output files, respectively. If you do not specify
130 outfile, objcopy creates a temporary file and destructively renames
131 the result with the name of infile.
132
133 -I bfdname
134 --input-target=bfdname
135 Consider the source file's object format to be bfdname, rather than
136 attempting to deduce it.
137
138 -O bfdname
139 --output-target=bfdname
140 Write the output file using the object format bfdname.
141
142 -F bfdname
143 --target=bfdname
144 Use bfdname as the object format for both the input and the output
145 file; i.e., simply transfer data from source to destination with no
146 translation.
147
148 -B bfdarch
149 --binary-architecture=bfdarch
150 Useful when transforming a architecture-less input file into an
151 object file. In this case the output architecture can be set to
152 bfdarch. This option will be ignored if the input file has a known
153 bfdarch. You can access this binary data inside a program by
154 referencing the special symbols that are created by the conversion
155 process. These symbols are called _binary_objfile_start,
156 _binary_objfile_end and _binary_objfile_size. e.g. you can
157 transform a picture file into an object file and then access it in
158 your code using these symbols.
159
160 -j sectionpattern
161 --only-section=sectionpattern
162 Copy only the indicated sections from the input file to the output
163 file. This option may be given more than once. Note that using
164 this option inappropriately may make the output file unusable.
165 Wildcard characters are accepted in sectionpattern.
166
167 -R sectionpattern
168 --remove-section=sectionpattern
169 Remove any section matching sectionpattern from the output file.
170 This option may be given more than once. Note that using this
171 option inappropriately may make the output file unusable. Wildcard
172 characters are accepted in sectionpattern. Using both the -j and
173 -R options together results in undefined behaviour.
174
175 -S
176 --strip-all
177 Do not copy relocation and symbol information from the source file.
178
179 -g
180 --strip-debug
181 Do not copy debugging symbols or sections from the source file.
182
183 --strip-unneeded
184 Strip all symbols that are not needed for relocation processing.
185
186 -K symbolname
187 --keep-symbol=symbolname
188 When stripping symbols, keep symbol symbolname even if it would
189 normally be stripped. This option may be given more than once.
190
191 -N symbolname
192 --strip-symbol=symbolname
193 Do not copy symbol symbolname from the source file. This option
194 may be given more than once.
195
196 --strip-unneeded-symbol=symbolname
197 Do not copy symbol symbolname from the source file unless it is
198 needed by a relocation. This option may be given more than once.
199
200 -G symbolname
201 --keep-global-symbol=symbolname
202 Keep only symbol symbolname global. Make all other symbols local
203 to the file, so that they are not visible externally. This option
204 may be given more than once.
205
206 --localize-hidden
207 In an ELF object, mark all symbols that have hidden or internal
208 visibility as local. This option applies on top of symbol-specific
209 localization options such as -L.
210
211 -L symbolname
212 --localize-symbol=symbolname
213 Make symbol symbolname local to the file, so that it is not visible
214 externally. This option may be given more than once.
215
216 -W symbolname
217 --weaken-symbol=symbolname
218 Make symbol symbolname weak. This option may be given more than
219 once.
220
221 --globalize-symbol=symbolname
222 Give symbol symbolname global scoping so that it is visible outside
223 of the file in which it is defined. This option may be given more
224 than once.
225
226 -w
227 --wildcard
228 Permit regular expressions in symbolnames used in other command
229 line options. The question mark (?), asterisk (*), backslash (\)
230 and square brackets ([]) operators can be used anywhere in the
231 symbol name. If the first character of the symbol name is the
232 exclamation point (!) then the sense of the switch is reversed for
233 that symbol. For example:
234
235 -w -W !foo -W fo*
236
237 would cause objcopy to weaken all symbols that start with "fo"
238 except for the symbol "foo".
239
240 -x
241 --discard-all
242 Do not copy non-global symbols from the source file.
243
244 -X
245 --discard-locals
246 Do not copy compiler-generated local symbols. (These usually start
247 with L or ..)
248
249 -b byte
250 --byte=byte
251 If interleaving has been enabled via the --interleave option then
252 start the range of bytes to keep at the byteth byte. byte can be
253 in the range from 0 to breadth-1, where breadth is the value given
254 by the --interleave option.
255
256 -i [breadth]
257 --interleave[=breadth]
258 Only copy a range out of every breadth bytes. (Header data is not
259 affected). Select which byte in the range begins the copy with the
260 --byte option. Select the width of the range with the
261 --interleave-width option.
262
263 This option is useful for creating files to program ROM. It is
264 typically used with an "srec" output target. Note that objcopy
265 will complain if you do not specify the --byte option as well.
266
267 The default interleave breadth is 4, so with --byte set to 0,
268 objcopy would copy the first byte out of every four bytes from the
269 input to the output.
270
271 --interleave-width=width
272 When used with the --interleave option, copy width bytes at a time.
273 The start of the range of bytes to be copied is set by the --byte
274 option, and the extent of the range is set with the --interleave
275 option.
276
277 The default value for this option is 1. The value of width plus
278 the byte value set by the --byte option must not exceed the
279 interleave breadth set by the --interleave option.
280
281 This option can be used to create images for two 16-bit flashes
282 interleaved in a 32-bit bus by passing -b 0 -i 4
283 --interleave-width=2 and -b 2 -i 4 --interleave-width=2 to two
284 objcopy commands. If the input was '12345678' then the outputs
285 would be '1256' and '3478' respectively.
286
287 -p
288 --preserve-dates
289 Set the access and modification dates of the output file to be the
290 same as those of the input file.
291
292 -D
293 --enable-deterministic-archives
294 Operate in deterministic mode. When copying archive members and
295 writing the archive index, use zero for UIDs, GIDs, timestamps, and
296 use consistent file modes for all files.
297
298 If binutils was configured with --enable-deterministic-archives,
299 then this mode is on by default. It can be disabled with the -U
300 option, below.
301
302 -U
303 --disable-deterministic-archives
304 Do not operate in deterministic mode. This is the inverse of the
305 -D option, above: when copying archive members and writing the
306 archive index, use their actual UID, GID, timestamp, and file mode
307 values.
308
309 This is the default unless binutils was configured with
310 --enable-deterministic-archives.
311
312 --debugging
313 Convert debugging information, if possible. This is not the
314 default because only certain debugging formats are supported, and
315 the conversion process can be time consuming.
316
317 --gap-fill val
318 Fill gaps between sections with val. This operation applies to the
319 load address (LMA) of the sections. It is done by increasing the
320 size of the section with the lower address, and filling in the
321 extra space created with val.
322
323 --pad-to address
324 Pad the output file up to the load address address. This is done
325 by increasing the size of the last section. The extra space is
326 filled in with the value specified by --gap-fill (default zero).
327
328 --set-start val
329 Set the start address of the new file to val. Not all object file
330 formats support setting the start address.
331
332 --change-start incr
333 --adjust-start incr
334 Change the start address by adding incr. Not all object file
335 formats support setting the start address.
336
337 --change-addresses incr
338 --adjust-vma incr
339 Change the VMA and LMA addresses of all sections, as well as the
340 start address, by adding incr. Some object file formats do not
341 permit section addresses to be changed arbitrarily. Note that this
342 does not relocate the sections; if the program expects sections to
343 be loaded at a certain address, and this option is used to change
344 the sections such that they are loaded at a different address, the
345 program may fail.
346
347 --change-section-address sectionpattern{=,+,-}val
348 --adjust-section-vma sectionpattern{=,+,-}val
349 Set or change both the VMA address and the LMA address of any
350 section matching sectionpattern. If = is used, the section address
351 is set to val. Otherwise, val is added to or subtracted from the
352 section address. See the comments under --change-addresses, above.
353 If sectionpattern does not match any sections in the input file, a
354 warning will be issued, unless --no-change-warnings is used.
355
356 --change-section-lma sectionpattern{=,+,-}val
357 Set or change the LMA address of any sections matching
358 sectionpattern. The LMA address is the address where the section
359 will be loaded into memory at program load time. Normally this is
360 the same as the VMA address, which is the address of the section at
361 program run time, but on some systems, especially those where a
362 program is held in ROM, the two can be different. If = is used,
363 the section address is set to val. Otherwise, val is added to or
364 subtracted from the section address. See the comments under
365 --change-addresses, above. If sectionpattern does not match any
366 sections in the input file, a warning will be issued, unless
367 --no-change-warnings is used.
368
369 --change-section-vma sectionpattern{=,+,-}val
370 Set or change the VMA address of any section matching
371 sectionpattern. The VMA address is the address where the section
372 will be located once the program has started executing. Normally
373 this is the same as the LMA address, which is the address where the
374 section will be loaded into memory, but on some systems, especially
375 those where a program is held in ROM, the two can be different. If
376 = is used, the section address is set to val. Otherwise, val is
377 added to or subtracted from the section address. See the comments
378 under --change-addresses, above. If sectionpattern does not match
379 any sections in the input file, a warning will be issued, unless
380 --no-change-warnings is used.
381
382 --change-warnings
383 --adjust-warnings
384 If --change-section-address or --change-section-lma or
385 --change-section-vma is used, and the section pattern does not
386 match any sections, issue a warning. This is the default.
387
388 --no-change-warnings
389 --no-adjust-warnings
390 Do not issue a warning if --change-section-address or
391 --adjust-section-lma or --adjust-section-vma is used, even if the
392 section pattern does not match any sections.
393
394 --set-section-flags sectionpattern=flags
395 Set the flags for any sections matching sectionpattern. The flags
396 argument is a comma separated string of flag names. The recognized
397 names are alloc, contents, load, noload, readonly, code, data, rom,
398 share, and debug. You can set the contents flag for a section
399 which does not have contents, but it is not meaningful to clear the
400 contents flag of a section which does have contents--just remove
401 the section instead. Not all flags are meaningful for all object
402 file formats.
403
404 --add-section sectionname=filename
405 Add a new section named sectionname while copying the file. The
406 contents of the new section are taken from the file filename. The
407 size of the section will be the size of the file. This option only
408 works on file formats which can support sections with arbitrary
409 names.
410
411 --rename-section oldname=newname[,flags]
412 Rename a section from oldname to newname, optionally changing the
413 section's flags to flags in the process. This has the advantage
414 over usng a linker script to perform the rename in that the output
415 stays as an object file and does not become a linked executable.
416
417 This option is particularly helpful when the input format is
418 binary, since this will always create a section called .data. If
419 for example, you wanted instead to create a section called .rodata
420 containing binary data you could use the following command line to
421 achieve it:
422
423 objcopy -I binary -O <output_format> -B <architecture> \
424 --rename-section .data=.rodata,alloc,load,readonly,data,contents \
425 <input_binary_file> <output_object_file>
426
427 --long-section-names {enable,disable,keep}
428 Controls the handling of long section names when processing "COFF"
429 and "PE-COFF" object formats. The default behaviour, keep, is to
430 preserve long section names if any are present in the input file.
431 The enable and disable options forcibly enable or disable the use
432 of long section names in the output object; when disable is in
433 effect, any long section names in the input object will be
434 truncated. The enable option will only emit long section names if
435 any are present in the inputs; this is mostly the same as keep, but
436 it is left undefined whether the enable option might force the
437 creation of an empty string table in the output file.
438
439 --change-leading-char
440 Some object file formats use special characters at the start of
441 symbols. The most common such character is underscore, which
442 compilers often add before every symbol. This option tells objcopy
443 to change the leading character of every symbol when it converts
444 between object file formats. If the object file formats use the
445 same leading character, this option has no effect. Otherwise, it
446 will add a character, or remove a character, or change a character,
447 as appropriate.
448
449 --remove-leading-char
450 If the first character of a global symbol is a special symbol
451 leading character used by the object file format, remove the
452 character. The most common symbol leading character is underscore.
453 This option will remove a leading underscore from all global
454 symbols. This can be useful if you want to link together objects
455 of different file formats with different conventions for symbol
456 names. This is different from --change-leading-char because it
457 always changes the symbol name when appropriate, regardless of the
458 object file format of the output file.
459
460 --reverse-bytes=num
461 Reverse the bytes in a section with output contents. A section
462 length must be evenly divisible by the value given in order for the
463 swap to be able to take place. Reversing takes place before the
464 interleaving is performed.
465
466 This option is used typically in generating ROM images for
467 problematic target systems. For example, on some target boards,
468 the 32-bit words fetched from 8-bit ROMs are re-assembled in
469 little-endian byte order regardless of the CPU byte order.
470 Depending on the programming model, the endianness of the ROM may
471 need to be modified.
472
473 Consider a simple file with a section containing the following
474 eight bytes: 12345678.
475
476 Using --reverse-bytes=2 for the above example, the bytes in the
477 output file would be ordered 21436587.
478
479 Using --reverse-bytes=4 for the above example, the bytes in the
480 output file would be ordered 43218765.
481
482 By using --reverse-bytes=2 for the above example, followed by
483 --reverse-bytes=4 on the output file, the bytes in the second
484 output file would be ordered 34127856.
485
486 --srec-len=ival
487 Meaningful only for srec output. Set the maximum length of the
488 Srecords being produced to ival. This length covers both address,
489 data and crc fields.
490
491 --srec-forceS3
492 Meaningful only for srec output. Avoid generation of S1/S2
493 records, creating S3-only record format.
494
495 --redefine-sym old=new
496 Change the name of a symbol old, to new. This can be useful when
497 one is trying link two things together for which you have no
498 source, and there are name collisions.
499
500 --redefine-syms=filename
501 Apply --redefine-sym to each symbol pair "old new" listed in the
502 file filename. filename is simply a flat file, with one symbol
503 pair per line. Line comments may be introduced by the hash
504 character. This option may be given more than once.
505
506 --weaken
507 Change all global symbols in the file to be weak. This can be
508 useful when building an object which will be linked against other
509 objects using the -R option to the linker. This option is only
510 effective when using an object file format which supports weak
511 symbols.
512
513 --keep-symbols=filename
514 Apply --keep-symbol option to each symbol listed in the file
515 filename. filename is simply a flat file, with one symbol name per
516 line. Line comments may be introduced by the hash character. This
517 option may be given more than once.
518
519 --strip-symbols=filename
520 Apply --strip-symbol option to each symbol listed in the file
521 filename. filename is simply a flat file, with one symbol name per
522 line. Line comments may be introduced by the hash character. This
523 option may be given more than once.
524
525 --strip-unneeded-symbols=filename
526 Apply --strip-unneeded-symbol option to each symbol listed in the
527 file filename. filename is simply a flat file, with one symbol
528 name per line. Line comments may be introduced by the hash
529 character. This option may be given more than once.
530
531 --keep-global-symbols=filename
532 Apply --keep-global-symbol option to each symbol listed in the file
533 filename. filename is simply a flat file, with one symbol name per
534 line. Line comments may be introduced by the hash character. This
535 option may be given more than once.
536
537 --localize-symbols=filename
538 Apply --localize-symbol option to each symbol listed in the file
539 filename. filename is simply a flat file, with one symbol name per
540 line. Line comments may be introduced by the hash character. This
541 option may be given more than once.
542
543 --globalize-symbols=filename
544 Apply --globalize-symbol option to each symbol listed in the file
545 filename. filename is simply a flat file, with one symbol name per
546 line. Line comments may be introduced by the hash character. This
547 option may be given more than once.
548
549 --weaken-symbols=filename
550 Apply --weaken-symbol option to each symbol listed in the file
551 filename. filename is simply a flat file, with one symbol name per
552 line. Line comments may be introduced by the hash character. This
553 option may be given more than once.
554
555 --alt-machine-code=index
556 If the output architecture has alternate machine codes, use the
557 indexth code instead of the default one. This is useful in case a
558 machine is assigned an official code and the tool-chain adopts the
559 new code, but other applications still depend on the original code
560 being used. For ELF based architectures if the index alternative
561 does not exist then the value is treated as an absolute number to
562 be stored in the e_machine field of the ELF header.
563
564 --writable-text
565 Mark the output text as writable. This option isn't meaningful for
566 all object file formats.
567
568 --readonly-text
569 Make the output text write protected. This option isn't meaningful
570 for all object file formats.
571
572 --pure
573 Mark the output file as demand paged. This option isn't meaningful
574 for all object file formats.
575
576 --impure
577 Mark the output file as impure. This option isn't meaningful for
578 all object file formats.
579
580 --prefix-symbols=string
581 Prefix all symbols in the output file with string.
582
583 --prefix-sections=string
584 Prefix all section names in the output file with string.
585
586 --prefix-alloc-sections=string
587 Prefix all the names of all allocated sections in the output file
588 with string.
589
590 --add-gnu-debuglink=path-to-file
591 Creates a .gnu_debuglink section which contains a reference to
592 path-to-file and adds it to the output file.
593
594 --keep-file-symbols
595 When stripping a file, perhaps with --strip-debug or
596 --strip-unneeded, retain any symbols specifying source file names,
597 which would otherwise get stripped.
598
599 --only-keep-debug
600 Strip a file, removing contents of any sections that would not be
601 stripped by --strip-debug and leaving the debugging sections
602 intact. In ELF files, this preserves all note sections in the
603 output.
604
605 The intention is that this option will be used in conjunction with
606 --add-gnu-debuglink to create a two part executable. One a
607 stripped binary which will occupy less space in RAM and in a
608 distribution and the second a debugging information file which is
609 only needed if debugging abilities are required. The suggested
610 procedure to create these files is as follows:
611
612 1.<Link the executable as normal. Assuming that is is called>
613 "foo" then...
614
615 1.<Run "objcopy --only-keep-debug foo foo.dbg" to>
616 create a file containing the debugging info.
617
618 1.<Run "objcopy --strip-debug foo" to create a>
619 stripped executable.
620
621 1.<Run "objcopy --add-gnu-debuglink=foo.dbg foo">
622 to add a link to the debugging info into the stripped
623 executable.
624
625 Note---the choice of ".dbg" as an extension for the debug info file
626 is arbitrary. Also the "--only-keep-debug" step is optional. You
627 could instead do this:
628
629 1.<Link the executable as normal.>
630 1.<Copy "foo" to "foo.full">
631 1.<Run "objcopy --strip-debug foo">
632 1.<Run "objcopy --add-gnu-debuglink=foo.full foo">
633
634 i.e., the file pointed to by the --add-gnu-debuglink can be the
635 full executable. It does not have to be a file created by the
636 --only-keep-debug switch.
637
638 Note---this switch is only intended for use on fully linked files.
639 It does not make sense to use it on object files where the
640 debugging information may be incomplete. Besides the gnu_debuglink
641 feature currently only supports the presence of one filename
642 containing debugging information, not multiple filenames on a one-
643 per-object-file basis.
644
645 --strip-dwo
646 Remove the contents of all DWARF .dwo sections, leaving the
647 remaining debugging sections and all symbols intact. This option
648 is intended for use by the compiler as part of the -gsplit-dwarf
649 option, which splits debug information between the .o file and a
650 separate .dwo file. The compiler generates all debug information
651 in the same file, then uses the --extract-dwo option to copy the
652 .dwo sections to the .dwo file, then the --strip-dwo option to
653 remove those sections from the original .o file.
654
655 --extract-dwo
656 Extract the contents of all DWARF .dwo sections. See the
657 --strip-dwo option for more information.
658
659 --file-alignment num
660 Specify the file alignment. Sections in the file will always begin
661 at file offsets which are multiples of this number. This defaults
662 to 512. [This option is specific to PE targets.]
663
664 --heap reserve
665 --heap reserve,commit
666 Specify the number of bytes of memory to reserve (and optionally
667 commit) to be used as heap for this program. [This option is
668 specific to PE targets.]
669
670 --image-base value
671 Use value as the base address of your program or dll. This is the
672 lowest memory location that will be used when your program or dll
673 is loaded. To reduce the need to relocate and improve performance
674 of your dlls, each should have a unique base address and not
675 overlap any other dlls. The default is 0x400000 for executables,
676 and 0x10000000 for dlls. [This option is specific to PE targets.]
677
678 --section-alignment num
679 Sets the section alignment. Sections in memory will always begin
680 at addresses which are a multiple of this number. Defaults to
681 0x1000. [This option is specific to PE targets.]
682
683 --stack reserve
684 --stack reserve,commit
685 Specify the number of bytes of memory to reserve (and optionally
686 commit) to be used as stack for this program. [This option is
687 specific to PE targets.]
688
689 --subsystem which
690 --subsystem which:major
691 --subsystem which:major.minor
692 Specifies the subsystem under which your program will execute. The
693 legal values for which are "native", "windows", "console", "posix",
694 "efi-app", "efi-bsd", "efi-rtd", "sal-rtd", and "xbox". You may
695 optionally set the subsystem version also. Numeric values are also
696 accepted for which. [This option is specific to PE targets.]
697
698 --extract-symbol
699 Keep the file's section flags and symbols but remove all section
700 data. Specifically, the option:
701
702 *<removes the contents of all sections;>
703 *<sets the size of every section to zero; and>
704 *<sets the file's start address to zero.>
705
706 This option is used to build a .sym file for a VxWorks kernel. It
707 can also be a useful way of reducing the size of a --just-symbols
708 linker input file.
709
710 --compress-debug-sections
711 Compress DWARF debug sections using zlib.
712
713 --decompress-debug-sections
714 Decompress DWARF debug sections using zlib.
715
716 -V
717 --version
718 Show the version number of objcopy.
719
720 -v
721 --verbose
722 Verbose output: list all object files modified. In the case of
723 archives, objcopy -V lists all members of the archive.
724
725 --help
726 Show a summary of the options to objcopy.
727
728 --info
729 Display a list showing all architectures and object formats
730 available.
731
732 @file
733 Read command-line options from file. The options read are inserted
734 in place of the original @file option. If file does not exist, or
735 cannot be read, then the option will be treated literally, and not
736 removed.
737
738 Options in file are separated by whitespace. A whitespace
739 character may be included in an option by surrounding the entire
740 option in either single or double quotes. Any character (including
741 a backslash) may be included by prefixing the character to be
742 included with a backslash. The file may itself contain additional
743 @file options; any such options will be processed recursively.
744
746 ld(1), objdump(1), and the Info entries for binutils.
747
749 Copyright (c) 1991-2013 Free Software Foundation, Inc.
750
751 Permission is granted to copy, distribute and/or modify this document
752 under the terms of the GNU Free Documentation License, Version 1.3 or
753 any later version published by the Free Software Foundation; with no
754 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
755 Texts. A copy of the license is included in the section entitled "GNU
756 Free Documentation License".
757
758
759
760binutils-2.24 2020-01-29 OBJCOPY(1)