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