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