Use symbolic names of relocation entries for the various
[deliverable/binutils-gdb.git] / binutils / strip.1
CommitLineData
2483354d 1.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation
df22f469 2.\" See section COPYING for conditions for redistribution
df22f469
RP
3.TH strip 1 "5 November 1991" "cygnus support" "GNU Development Tools"
4.de BP
5.sp
6.ti \-.2i
7\(**
8..
9
10.SH NAME
938fa52b 11strip \- Discard symbols from object files.
df22f469
RP
12
13.SH SYNOPSIS
0aca460e
ILT
14.hy 0
15.na
16.TP
1f72cab1 17.B strip
dff604a7
ILT
18.RB "[\|" \-F\ \fIbfdname\fR\ |\ \fB\-\-target=\fIbfdname\fP "\|]"
19.RB "[\|" \-I\ \fIbfdname\fR\ |\ \fB\-\-input\-target=\fIbfdname\fP "\|]"
20.RB "[\|" \-O\ \fIbfdname\fR\ |\ \fB\-\-output\-target=\fIbfdname\fP "\|]"
21.RB "[\|" \-R\ \fIsectionname\fR\ |\ \fB\-\-remove\-section=\fIsectionname\fP "\|]"
22.RB "[\|" \-s\fR\ |\ \fB\-\-strip\-all "\|]"
23.RB "[\|" \-S\fR\ |\ \fB\-g\fR\ |\ \fB\-\-strip\-debug "\|]"
9135e5f8 24.RB "[\|" \-\-strip\-unneeded\fR "\|]"
dff604a7
ILT
25.RB "[\|" \-x\fR\ |\ \fB\-\-discard\-all "\|]"
26.RB "[\|" \-X\fR\ |\ \fB\-\-discard\-locals "\|]"
27.RB "[\|" \-K\ \fIsymbolname\fR\ |\ \fB\-\-keep\-symbol=\fIsymbolname\fR "\|]"
16c3e32a
ILT
28.RB "[\|" \-N\ \fIsymbolname\fR\ |\ \fB\-\-strip\-symbol=\fIsymbolname\fR "\|]"
29.RB "[\|" \-o\ \fIfile\f\R "\|]"
2483354d 30.RB "[\|" \-p\fR\ |\ \fB\-\-preserve\-dates "\|]"
dff604a7
ILT
31.RB "[\|" \-v\fR\ |\ \fB\-\-verbose "\|]"
32.RB "[\|" \-V\fR\ |\ \fB\-\-version "\|]"
33.RB "[\|" \-V\fR\ |\ \fB\-\-help "\|]"
1f72cab1 34.I objfile\c
df22f469 35\&.\|.\|.
1815e42c 36
df22f469 37.SH DESCRIPTION
b26ac613
DM
38GNU
39.B strip
40discards all symbols from the object files
41.IR objfile .
42The list of object files may include archives.
43At least one object file must be given.
df22f469 44
b26ac613
DM
45.P
46.B strip
47modifies the files named in its argument,
df22f469
RP
48rather than writing modified copies under different names.
49
50.SH OPTIONS
1f72cab1 51.TP
eae04238 52.B "\-F \fIbfdname"
b26ac613 53.TP
eae04238 54.B "\-\-target=\fIbfdname"
1f72cab1 55Treat the original \fIobjfile\fP as a file with the object
eae04238 56code format \fIbfdname\fP, and rewrite it in the same format.
1f72cab1
DM
57
58.TP
b26ac613
DM
59.B \-\-help
60Show a summary of the options to
61.B strip
62and exit.
63
64.TP
eae04238 65.B "\-I \fIbfdname
b26ac613 66.TP
eae04238 67.B "\-\-input\-target=\fIbfdname"
1f72cab1 68Treat the original \fIobjfile\fP as a file with the object
eae04238 69code format \fIbfdname\fP.
1f72cab1
DM
70
71.TP
eae04238 72.B "\-O \fIbfdname\fP"
b26ac613 73.TP
eae04238
DM
74.B "\-\-output\-target=\fIbfdname"
75Replace \fIobjfile\fP with a file in the output format \fIbfdname\fP.
1f72cab1 76
0aca460e
ILT
77.TP
78.B "\-R \fIsectionname\fP"
79.TP
80.B "\-\-remove\-section=\fIsectionname"
81Remove the named section from the file. This option may be given more
82than once. Note that using this option inappropriately may make the
83object file unusable.
84
1f72cab1 85.TP
b26ac613
DM
86.B \-s
87.TP
88.B \-\-strip\-all
1f72cab1
DM
89Remove all symbols.
90
91.TP
b26ac613
DM
92.B \-S
93.TP
5740d9df 94.B \-g
b26ac613
DM
95.TP
96.B \-\-strip\-debug
1f72cab1
DM
97Remove debugging symbols only.
98
9135e5f8
ILT
99.TP
100.B \-\-strip\-unneeded
101Strip all symbols that are not needed for relocation processing.
102
29c0d15c
ILT
103.TP
104.B \-N \fIsymbolname\fR
105.TP
106.B \-\-strip\-symbol=\fIsymbolname
107Remove symbol \fIsymbolname\fP from the source file. This option
108may be given more than once, and may be combined with other strip
109options.
110
16c3e32a
ILT
111.TP
112.B \-o \fIfile\fR
113Put the stripped output in \fIfile\fR, rather than replacing the
114existing file. When this argument is used, only one \fIobjfile\fR
115argument may be specified.
116
2483354d
ILT
117.TP
118.B \-p
119.TP
120.B \-\-preserve-dates
121Preserve the access and modification dates of the file.
122
1f72cab1 123.TP
b26ac613
DM
124.B \-x
125.TP
126.B \-\-discard\-all
1f72cab1
DM
127Remove non-global symbols.
128
129.TP
5740d9df
KR
130.B \-X
131.TP
132.B \-\-discard\-locals
1f72cab1
DM
133Remove compiler-generated local symbols.
134(These usually start with ``L'' or ``.''.)
135
dff604a7
ILT
136.TP
137.B \-K \fIsymbolname\fR, \fB\-\-keep\-symbol=\fIsymbolname
138Copy only symbol \fIsymbolname\fP from the source file. This option
139may be given more than once.
140
141.TP
142.B \-N \fIsymbolname\fR, \fB\-\-strip\-symbol=\fIsymbolname
143Do not copy symbol \fIsymbolname\fP from the source file. This option
144may be given more than once, and may be combined with strip options
145other than \fB\-K\fR.
146
1f72cab1 147.TP
b26ac613
DM
148.B \-v
149.TP
150.B \-\-verbose
1f72cab1 151Verbose output: list all object files modified. In the case of
b26ac613
DM
152archives,
153.B "strip \-V"
154lists all members of the archive.
1f72cab1
DM
155
156.TP
b26ac613
DM
157.B \-V
158.TP
159.B \-\-version
160Show the version number for \fBstrip\fP and exit.
df22f469
RP
161
162.SH "SEE ALSO"
163.RB "`\|" binutils "\|'"
164entry in
b26ac613 165.BR info ;
5740d9df 166.IR "The GNU Binary Utilities" ,
b26ac613 167Roland H. Pesch (October 1991).
df22f469
RP
168
169.SH COPYING
170Copyright (c) 1991 Free Software Foundation, Inc.
171.PP
172Permission is granted to make and distribute verbatim copies of
173this manual provided the copyright notice and this permission notice
174are preserved on all copies.
175.PP
176Permission is granted to copy and distribute modified versions of this
177manual under the conditions for verbatim copying, provided that the
178entire resulting derived work is distributed under the terms of a
179permission notice identical to this one.
180.PP
181Permission is granted to copy and distribute translations of this
182manual into another language, under the above conditions for modified
183versions, except that this permission notice may be included in
184translations approved by the Free Software Foundation instead of in
185the original English.
This page took 0.20542 seconds and 4 git commands to generate.