More changes to print ambiguous matches and use the
[deliverable/binutils-gdb.git] / binutils / objcopy.1
CommitLineData
08ad9921
JO
1.\" Copyright (c) 1991 Free Software Foundation
2.\" See section COPYING for conditions for redistribution
3.TH objcopy 1 "June 1993" "cygnus support" "GNU Development Tools"
4.de BP
5.sp
6.ti \-.2i
7\(**
8..
9
10.SH NAME
f7b839f7 11objcopy \- copy and translate object files
08ad9921
JO
12
13.SH SYNOPSIS
14.hy 0
15.na
b26ac613 16.TP
08ad9921 17.B objcopy
eae04238
DM
18.RB "[\|" \-F\ \fIbfdname\fB\ |\ \-\-target=\fIbfdname\fR "\|]"
19.RB "[\|" \-I\ \fIbfdname\fB\ |\ \-\-input\-target=\fIbfdname\fR "\|]"
20.RB "[\|" \-O\ \fIbfdname\fB\ |\ \-\-output\-target=\fIbfdname\fR "\|]"
3883531f
JO
21.RB "[\|" \-S\ |\ \-\-strip\-all\fR "\|]"
22.RB "[\|" \-g\ |\ \-\-strip\-debug\fR "\|]"
23.RB "[\|" \-x\ |\ \-\-discard\-all\fR "\|]"
24.RB "[\|" \-X\ |\ \-\-discard\-locals\fR "\|]"
f7b839f7
DM
25.RB "[\|" \-b\ \fIbyte\fP |\ \-\-byte=\fIbyte\fP "\|]"
26.RB "[\|" \-i\ \fIinterleave\fP |\ \-\-interleave=\fIinterleave\fP "\|]"
3883531f
JO
27.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]"
28.RB "[\|" \-V\ |\ \-\-version\fR "\|]"
29.RB "[\|" \-\-help\fR "\|]"
b26ac613 30.B infile
3883531f 31.RB "[\|" outfile\fR "\|]"
08ad9921
JO
32.SH DESCRIPTION
33The GNU
34.B objcopy
35utility copies the contents of an object file to another.
36.B objcopy
37uses the GNU BFD Library to read and write the object files. It can
38write the destination object file in a format different from that of
39the source object file. The exact behavior of
40.B objcopy
41is controlled by command-line options.
b26ac613 42.PP
08ad9921
JO
43.B objcopy
44creates temporary files to do its translations and deletes them
45afterward.
46.B objcopy
47uses BFD to do all its translation work; it knows about all the
48formats BFD knows about, and thus is able to recognize most formats
49without being told explicitly.
b26ac613
DM
50.PP
51.I infile
52and
53.I outfile
54are the source and output files respectively. If you do not specify
08ad9921
JO
55.IR outfile ,
56.B objcopy
57creates a temporary file and destructively renames the result with the
58name of the input file.
b26ac613
DM
59
60.SH OPTIONS
08ad9921 61.TP
eae04238 62.B \-I \fIbfdname\fR, \fB\-\-input\-target=\fIbfdname
08ad9921 63Consider the source file's object format to be
eae04238 64.IR bfdname ,
08ad9921
JO
65rather than attempting to deduce it.
66.TP
eae04238 67.B \-O \fIbfdname\fR, \fB\-\-output\-target=\fIbfdname
08ad9921 68Write the output file using the object format
eae04238 69.IR bfdname .
08ad9921 70.TP
eae04238 71.B \-F \fIbfdname\fR, \fB\-\-target=\fIbfdname
08ad9921 72Use
eae04238 73.I bfdname
08ad9921
JO
74as the object format for both the input and the output file; i.e.
75simply transfer data from source to destination with no translation.
76.TP
3883531f 77.B \-S\fR, \fB\-\-strip\-all
08ad9921
JO
78Do not copy relocation and symbol information from the source file.
79.TP
3883531f 80.B \-g\fR, \fB\-\-strip\-debug
08ad9921
JO
81Do not copy debugging symbols from the source file.
82.TP
3883531f 83.B \-x\fR, \fB \-\-discard\-all
08ad9921
JO
84Do not copy non-global symbols from the source file.
85.TP
3883531f 86.B \-X\fR, \fB\-\-discard\-locals
08ad9921
JO
87Do not copy compiler-generated local symbols. (These usually start
88with "L" or ".").
89.TP
f7b839f7
DM
90.B \-b \fIbyte\fR, \fB\-\-byte=\fIbyte
91Keep only every \fIbyte\fPth byte of the input file (header data is
92not affected). \fIbyte\fP can be in the range from 0 to the
93interleave-1. This option is useful for creating files to program
94ROMs. It is typically used with an srec output target.
95.TP
96.B \-i \fIinterleave\fR, \fB\-\-interleave=\fIinterleave
97Only copy one out of every \fIinterleave\fP bytes. Which one to copy is
98selected by the \fB\-b\fP or \fB\-\-byte\fP option. The default is 4.
99The interleave is ignored if neither \fB\-b\fP nor \fB\-\-byte\fP is given.
100.TP
3883531f 101.B \-v\fR, \fB\-\-verbose
08ad9921 102Verbose output: list all object files modified. In the case of
b26ac613
DM
103archives, "\fBobjcopy \-V\fR" lists all members of the archive.
104.TP
3883531f 105.B \-V\fR, \fB\-\-version
08ad9921 106Show the version number of
b26ac613
DM
107.B objcopy
108and exit.
109.TP
110.B \-\-help
111Show a summary of the options to
112.B objcopy
113and exit.
08ad9921
JO
114.SH "SEE ALSO"
115.RB "`\|" binutils "\|'"
116entry in
117.B
118info\c
119\&;
120.I
121The GNU Binary Utilities\c
122\&, Roland H. Pesch (June 1993).
123
124.SH COPYING
125Copyright (c) 1993 Free Software Foundation, Inc.
126.PP
127Permission is granted to make and distribute verbatim copies of
128this manual provided the copyright notice and this permission notice
129are preserved on all copies.
130.PP
131Permission is granted to copy and distribute modified versions of this
132manual under the conditions for verbatim copying, provided that the
133entire resulting derived work is distributed under the terms of a
134permission notice identical to this one.
135.PP
136Permission is granted to copy and distribute translations of this
137manual into another language, under the above conditions for modified
138versions, except that this permission notice may be included in
139translations approved by the Free Software Foundation instead of in
140the original English.
This page took 0.054464 seconds and 4 git commands to generate.