(gas-dg-test): Detect invalid values of `do_what'.
[deliverable/binutils-gdb.git] / binutils / strip.1
CommitLineData
df22f469
RP
1.\" Copyright (c) 1991 Free Software Foundation
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 "\|]"
24.RB "[\|" \-x\fR\ |\ \fB\-\-discard\-all "\|]"
25.RB "[\|" \-X\fR\ |\ \fB\-\-discard\-locals "\|]"
26.RB "[\|" \-K\ \fIsymbolname\fR\ |\ \fB\-\-keep\-symbol=\fIsymbolname\fR "\|]"
27.RB "[\|" \-N\ \fIsymbolname\fR\ |\ \fB\-\-strip\-symbol=\fIsymbolname\fR "\|]"
28.RB "[\|" \-v\fR\ |\ \fB\-\-verbose "\|]"
29.RB "[\|" \-V\fR\ |\ \fB\-\-version "\|]"
30.RB "[\|" \-V\fR\ |\ \fB\-\-help "\|]"
1f72cab1 31.I objfile\c
df22f469 32\&.\|.\|.
1815e42c 33
df22f469 34.SH DESCRIPTION
b26ac613
DM
35GNU
36.B strip
37discards all symbols from the object files
38.IR objfile .
39The list of object files may include archives.
40At least one object file must be given.
df22f469 41
b26ac613
DM
42.P
43.B strip
44modifies the files named in its argument,
df22f469
RP
45rather than writing modified copies under different names.
46
47.SH OPTIONS
1f72cab1 48.TP
eae04238 49.B "\-F \fIbfdname"
b26ac613 50.TP
eae04238 51.B "\-\-target=\fIbfdname"
1f72cab1 52Treat the original \fIobjfile\fP as a file with the object
eae04238 53code format \fIbfdname\fP, and rewrite it in the same format.
1f72cab1
DM
54
55.TP
b26ac613
DM
56.B \-\-help
57Show a summary of the options to
58.B strip
59and exit.
60
61.TP
eae04238 62.B "\-I \fIbfdname
b26ac613 63.TP
eae04238 64.B "\-\-input\-target=\fIbfdname"
1f72cab1 65Treat the original \fIobjfile\fP as a file with the object
eae04238 66code format \fIbfdname\fP.
1f72cab1
DM
67
68.TP
eae04238 69.B "\-O \fIbfdname\fP"
b26ac613 70.TP
eae04238
DM
71.B "\-\-output\-target=\fIbfdname"
72Replace \fIobjfile\fP with a file in the output format \fIbfdname\fP.
1f72cab1 73
0aca460e
ILT
74.TP
75.B "\-R \fIsectionname\fP"
76.TP
77.B "\-\-remove\-section=\fIsectionname"
78Remove the named section from the file. This option may be given more
79than once. Note that using this option inappropriately may make the
80object file unusable.
81
1f72cab1 82.TP
b26ac613
DM
83.B \-s
84.TP
85.B \-\-strip\-all
1f72cab1
DM
86Remove all symbols.
87
88.TP
b26ac613
DM
89.B \-S
90.TP
91.B -g
92.TP
93.B \-\-strip\-debug
1f72cab1
DM
94Remove debugging symbols only.
95
29c0d15c
ILT
96.TP
97.B \-N \fIsymbolname\fR
98.TP
99.B \-\-strip\-symbol=\fIsymbolname
100Remove symbol \fIsymbolname\fP from the source file. This option
101may be given more than once, and may be combined with other strip
102options.
103
1f72cab1 104.TP
b26ac613
DM
105.B \-x
106.TP
107.B \-\-discard\-all
1f72cab1
DM
108Remove non-global symbols.
109
110.TP
111.B "\-X \-\-discard\-locals"
112Remove compiler-generated local symbols.
113(These usually start with ``L'' or ``.''.)
114
dff604a7
ILT
115.TP
116.B \-K \fIsymbolname\fR, \fB\-\-keep\-symbol=\fIsymbolname
117Copy only symbol \fIsymbolname\fP from the source file. This option
118may be given more than once.
119
120.TP
121.B \-N \fIsymbolname\fR, \fB\-\-strip\-symbol=\fIsymbolname
122Do not copy symbol \fIsymbolname\fP from the source file. This option
123may be given more than once, and may be combined with strip options
124other than \fB\-K\fR.
125
1f72cab1 126.TP
b26ac613
DM
127.B \-v
128.TP
129.B \-\-verbose
1f72cab1 130Verbose output: list all object files modified. In the case of
b26ac613
DM
131archives,
132.B "strip \-V"
133lists all members of the archive.
1f72cab1
DM
134
135.TP
b26ac613
DM
136.B \-V
137.TP
138.B \-\-version
139Show the version number for \fBstrip\fP and exit.
df22f469
RP
140
141.SH "SEE ALSO"
142.RB "`\|" binutils "\|'"
143entry in
b26ac613
DM
144.BR info ;
145.IR "The GNU Binary Utilities ,
146Roland H. Pesch (October 1991).
df22f469
RP
147
148.SH COPYING
149Copyright (c) 1991 Free Software Foundation, Inc.
150.PP
151Permission is granted to make and distribute verbatim copies of
152this manual provided the copyright notice and this permission notice
153are preserved on all copies.
154.PP
155Permission is granted to copy and distribute modified versions of this
156manual under the conditions for verbatim copying, provided that the
157entire resulting derived work is distributed under the terms of a
158permission notice identical to this one.
159.PP
160Permission is granted to copy and distribute translations of this
161manual into another language, under the above conditions for modified
162versions, except that this permission notice may be included in
163translations approved by the Free Software Foundation instead of in
164the original English.
This page took 0.117444 seconds and 4 git commands to generate.