Set correct values for NM, SIZE etc...
[deliverable/binutils-gdb.git] / binutils / objcopy.1
... / ...
CommitLineData
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
11objcopy \- copy and translate object files
12
13.SH SYNOPSIS
14.hy 0
15.na
16.TP
17.B objcopy
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 "\|]"
21.RB "[\|" \-S\ |\ \-\-strip\-all\fR "\|]"
22.RB "[\|" \-g\ |\ \-\-strip\-debug\fR "\|]"
23.RB "[\|" \-x\ |\ \-\-discard\-all\fR "\|]"
24.RB "[\|" \-X\ |\ \-\-discard\-locals\fR "\|]"
25.RB "[\|" \-b\ \fIbyte\fP |\ \-\-byte=\fIbyte\fP "\|]"
26.RB "[\|" \-i\ \fIinterleave\fP |\ \-\-interleave=\fIinterleave\fP "\|]"
27.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]"
28.RB "[\|" \-V\ |\ \-\-version\fR "\|]"
29.RB "[\|" \-\-help\fR "\|]"
30.B infile
31.RB "[\|" outfile\fR "\|]"
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.
42.PP
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.
50.PP
51.I infile
52and
53.I outfile
54are the source and output files respectively. If you do not specify
55.IR outfile ,
56.B objcopy
57creates a temporary file and destructively renames the result with the
58name of the input file.
59
60.SH OPTIONS
61.TP
62.B \-I \fIbfdname\fR, \fB\-\-input\-target=\fIbfdname
63Consider the source file's object format to be
64.IR bfdname ,
65rather than attempting to deduce it.
66.TP
67.B \-O \fIbfdname\fR, \fB\-\-output\-target=\fIbfdname
68Write the output file using the object format
69.IR bfdname .
70.TP
71.B \-F \fIbfdname\fR, \fB\-\-target=\fIbfdname
72Use
73.I bfdname
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
77.B \-S\fR, \fB\-\-strip\-all
78Do not copy relocation and symbol information from the source file.
79.TP
80.B \-g\fR, \fB\-\-strip\-debug
81Do not copy debugging symbols from the source file.
82.TP
83.B \-x\fR, \fB \-\-discard\-all
84Do not copy non-global symbols from the source file.
85.TP
86.B \-X\fR, \fB\-\-discard\-locals
87Do not copy compiler-generated local symbols. (These usually start
88with "L" or ".").
89.TP
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
101.B \-v\fR, \fB\-\-verbose
102Verbose output: list all object files modified. In the case of
103archives, "\fBobjcopy \-V\fR" lists all members of the archive.
104.TP
105.B \-V\fR, \fB\-\-version
106Show the version number of
107.B objcopy
108and exit.
109.TP
110.B \-\-help
111Show a summary of the options to
112.B objcopy
113and exit.
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.023782 seconds and 4 git commands to generate.