]>
Commit | Line | Data |
---|---|---|
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 | 11 | objcopy \- 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 |
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. | |
b26ac613 | 42 | .PP |
08ad9921 JO |
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. | |
b26ac613 DM |
50 | .PP |
51 | .I infile | |
52 | and | |
53 | .I outfile | |
54 | are the source and output files respectively. If you do not specify | |
08ad9921 JO |
55 | .IR outfile , |
56 | .B objcopy | |
57 | creates a temporary file and destructively renames the result with the | |
58 | name of the input file. | |
b26ac613 DM |
59 | |
60 | .SH OPTIONS | |
08ad9921 | 61 | .TP |
eae04238 | 62 | .B \-I \fIbfdname\fR, \fB\-\-input\-target=\fIbfdname |
08ad9921 | 63 | Consider the source file's object format to be |
eae04238 | 64 | .IR bfdname , |
08ad9921 JO |
65 | rather than attempting to deduce it. |
66 | .TP | |
eae04238 | 67 | .B \-O \fIbfdname\fR, \fB\-\-output\-target=\fIbfdname |
08ad9921 | 68 | Write the output file using the object format |
eae04238 | 69 | .IR bfdname . |
08ad9921 | 70 | .TP |
eae04238 | 71 | .B \-F \fIbfdname\fR, \fB\-\-target=\fIbfdname |
08ad9921 | 72 | Use |
eae04238 | 73 | .I bfdname |
08ad9921 JO |
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 | |
3883531f | 77 | .B \-S\fR, \fB\-\-strip\-all |
08ad9921 JO |
78 | Do not copy relocation and symbol information from the source file. |
79 | .TP | |
3883531f | 80 | .B \-g\fR, \fB\-\-strip\-debug |
08ad9921 JO |
81 | Do not copy debugging symbols from the source file. |
82 | .TP | |
3883531f | 83 | .B \-x\fR, \fB \-\-discard\-all |
08ad9921 JO |
84 | Do not copy non-global symbols from the source file. |
85 | .TP | |
3883531f | 86 | .B \-X\fR, \fB\-\-discard\-locals |
08ad9921 JO |
87 | Do not copy compiler-generated local symbols. (These usually start |
88 | with "L" or "."). | |
89 | .TP | |
f7b839f7 DM |
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 | |
3883531f | 101 | .B \-v\fR, \fB\-\-verbose |
08ad9921 | 102 | Verbose output: list all object files modified. In the case of |
b26ac613 DM |
103 | archives, "\fBobjcopy \-V\fR" lists all members of the archive. |
104 | .TP | |
3883531f | 105 | .B \-V\fR, \fB\-\-version |
08ad9921 | 106 | Show the version number of |
b26ac613 DM |
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. | |
08ad9921 JO |
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. |