Add GNU Free Documentation License
[deliverable/binutils-gdb.git] / binutils / strip.1
CommitLineData
cf055d54 1.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation
252b5132 2.\" See section COPYING for conditions for redistribution
cf055d54 3.TH strip 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools"
252b5132
RH
4.de BP
5.sp
6.ti \-.2i
7\(**
8..
9
10.SH NAME
11strip \- Discard symbols from object files.
12
13.SH SYNOPSIS
14.hy 0
15.na
16.TP
17.B strip
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 "[\|" \-\-strip\-unneeded\fR "\|]"
25.RB "[\|" \-x\fR\ |\ \fB\-\-discard\-all "\|]"
26.RB "[\|" \-X\fR\ |\ \fB\-\-discard\-locals "\|]"
27.RB "[\|" \-K\ \fIsymbolname\fR\ |\ \fB\-\-keep\-symbol=\fIsymbolname\fR "\|]"
28.RB "[\|" \-N\ \fIsymbolname\fR\ |\ \fB\-\-strip\-symbol=\fIsymbolname\fR "\|]"
468390eb 29.RB "[\|" \-o\ \fIfile\fR "\|]"
252b5132
RH
30.RB "[\|" \-p\fR\ |\ \fB\-\-preserve\-dates "\|]"
31.RB "[\|" \-v\fR\ |\ \fB\-\-verbose "\|]"
32.RB "[\|" \-V\fR\ |\ \fB\-\-version "\|]"
33.RB "[\|" \-V\fR\ |\ \fB\-\-help "\|]"
34.I objfile\c
35\&.\|.\|.
36
37.SH DESCRIPTION
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.
44
45.P
46.B strip
47modifies the files named in its argument,
48rather than writing modified copies under different names.
49
50.SH OPTIONS
51.TP
52.B "\-F \fIbfdname"
53.TP
54.B "\-\-target=\fIbfdname"
55Treat the original \fIobjfile\fP as a file with the object
56code format \fIbfdname\fP, and rewrite it in the same format.
57
58.TP
59.B \-\-help
60Show a summary of the options to
61.B strip
62and exit.
63
64.TP
65.B "\-I \fIbfdname
66.TP
67.B "\-\-input\-target=\fIbfdname"
68Treat the original \fIobjfile\fP as a file with the object
69code format \fIbfdname\fP.
70
71.TP
72.B "\-O \fIbfdname\fP"
73.TP
74.B "\-\-output\-target=\fIbfdname"
75Replace \fIobjfile\fP with a file in the output format \fIbfdname\fP.
76
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
85.TP
86.B \-s
87.TP
88.B \-\-strip\-all
89Remove all symbols.
90
91.TP
92.B \-S
93.TP
94.B \-g
95.TP
96.B \-\-strip\-debug
97Remove debugging symbols only.
98
99.TP
100.B \-\-strip\-unneeded
101Strip all symbols that are not needed for relocation processing.
102
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
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
117.TP
118.B \-p
119.TP
120.B \-\-preserve-dates
121Preserve the access and modification dates of the file.
122
123.TP
124.B \-x
125.TP
126.B \-\-discard\-all
127Remove non-global symbols.
128
129.TP
130.B \-X
131.TP
132.B \-\-discard\-locals
133Remove compiler-generated local symbols.
134(These usually start with ``L'' or ``.''.)
135
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
147.TP
148.B \-v
149.TP
150.B \-\-verbose
151Verbose output: list all object files modified. In the case of
152archives,
153.B "strip \-v"
154lists all members of the archive.
155
156.TP
157.B \-V
158.TP
159.B \-\-version
160Show the version number for \fBstrip\fP and exit.
161
162.SH "SEE ALSO"
163.RB "`\|" binutils "\|'"
164entry in
165.BR info ;
166.IR "The GNU Binary Utilities" ,
167Roland H. Pesch (October 1991).
168
169.SH COPYING
cf055d54
NC
170Copyright (c) 1991, 2000 Free Software Foundation, Inc.
171.PP
172This document is distributed under the terms of the GNU Free
173Documenation License. That license is described in the GNU Free
174Documentation License section.
175
176.SH GNU Free Documentation License
177 Version 1.1, March 2000
178
179 Copyright (C) 2000 Free Software Foundation, Inc.
180 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
181
182 Everyone is permitted to copy and distribute verbatim
183 copies of this license document, but changing it is
184 not allowed.
185.PP
1860. PREAMBLE
187.PP
188The purpose of this License is to make a manual, textbook, or other
189written document "free" in the sense of freedom: to assure everyone
190the effective freedom to copy and redistribute it, with or without
191modifying it, either commercially or noncommercially. Secondarily,
192this License preserves for the author and publisher a way to get
193credit for their work, while not being considered responsible for
194modifications made by others.
195.PP
196This License is a kind of "copyleft", which means that derivative
197works of the document must themselves be free in the same sense. It
198complements the GNU General Public License, which is a copyleft
199license designed for free software.
200.PP
201We have designed this License in order to use it for manuals for free
202software, because free software needs free documentation: a free
203program should come with manuals providing the same freedoms that the
204software does. But this License is not limited to software manuals;
205it can be used for any textual work, regardless of subject matter or
206whether it is published as a printed book. We recommend this License
207principally for works whose purpose is instruction or reference.
208.PP
2091. APPLICABILITY AND DEFINITIONS
210.PP
211This License applies to any manual or other work that contains a
212notice placed by the copyright holder saying it can be distributed
213under the terms of this License. The "Document", below, refers to any
214such manual or work. Any member of the public is a licensee, and is
215addressed as "you".
216.PP
217A "Modified Version" of the Document means any work containing the
218Document or a portion of it, either copied verbatim, or with
219modifications and/or translated into another language.
220.PP
221A "Secondary Section" is a named appendix or a front-matter section of
222the Document that deals exclusively with the relationship of the
223publishers or authors of the Document to the Document's overall subject
224(or to related matters) and contains nothing that could fall directly
225within that overall subject. (For example, if the Document is in part a
226textbook of mathematics, a Secondary Section may not explain any
227mathematics.) The relationship could be a matter of historical
228connection with the subject or with related matters, or of legal,
229commercial, philosophical, ethical or political position regarding
230them.
231.PP
232The "Invariant Sections" are certain Secondary Sections whose titles
233are designated, as being those of Invariant Sections, in the notice
234that says that the Document is released under this License.
235.PP
236The "Cover Texts" are certain short passages of text that are listed,
237as Front-Cover Texts or Back-Cover Texts, in the notice that says that
238the Document is released under this License.
239.PP
240A "Transparent" copy of the Document means a machine-readable copy,
241represented in a format whose specification is available to the
242general public, whose contents can be viewed and edited directly and
243straightforwardly with generic text editors or (for images composed of
244pixels) generic paint programs or (for drawings) some widely available
245drawing editor, and that is suitable for input to text formatters or
246for automatic translation to a variety of formats suitable for input
247to text formatters. A copy made in an otherwise Transparent file
248format whose markup has been designed to thwart or discourage
249subsequent modification by readers is not Transparent. A copy that is
250not "Transparent" is called "Opaque".
251.PP
252Examples of suitable formats for Transparent copies include plain
253ASCII without markup, Texinfo input format, LaTeX input format, SGML
254or XML using a publicly available DTD, and standard-conforming simple
255HTML designed for human modification. Opaque formats include
256PostScript, PDF, proprietary formats that can be read and edited only
257by proprietary word processors, SGML or XML for which the DTD and/or
258processing tools are not generally available, and the
259machine-generated HTML produced by some word processors for output
260purposes only.
261.PP
262The "Title Page" means, for a printed book, the title page itself,
263plus such following pages as are needed to hold, legibly, the material
264this License requires to appear in the title page. For works in
265formats which do not have any title page as such, "Title Page" means
266the text near the most prominent appearance of the work's title,
267preceding the beginning of the body of the text.
268.PP
2692. VERBATIM COPYING
270.PP
271You may copy and distribute the Document in any medium, either
272commercially or noncommercially, provided that this License, the
273copyright notices, and the license notice saying this License applies
274to the Document are reproduced in all copies, and that you add no other
275conditions whatsoever to those of this License. You may not use
276technical measures to obstruct or control the reading or further
277copying of the copies you make or distribute. However, you may accept
278compensation in exchange for copies. If you distribute a large enough
279number of copies you must also follow the conditions in section 3.
280.PP
281You may also lend copies, under the same conditions stated above, and
282you may publicly display copies.
283.PP
2843. COPYING IN QUANTITY
285.PP
286If you publish printed copies of the Document numbering more than 100,
287and the Document's license notice requires Cover Texts, you must enclose
288the copies in covers that carry, clearly and legibly, all these Cover
289Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
290the back cover. Both covers must also clearly and legibly identify
291you as the publisher of these copies. The front cover must present
292the full title with all words of the title equally prominent and
293visible. You may add other material on the covers in addition.
294Copying with changes limited to the covers, as long as they preserve
295the title of the Document and satisfy these conditions, can be treated
296as verbatim copying in other respects.
297.PP
298If the required texts for either cover are too voluminous to fit
299legibly, you should put the first ones listed (as many as fit
300reasonably) on the actual cover, and continue the rest onto adjacent
301pages.
302.PP
303If you publish or distribute Opaque copies of the Document numbering
304more than 100, you must either include a machine-readable Transparent
305copy along with each Opaque copy, or state in or with each Opaque copy
306a publicly-accessible computer-network location containing a complete
307Transparent copy of the Document, free of added material, which the
308general network-using public has access to download anonymously at no
309charge using public-standard network protocols. If you use the latter
310option, you must take reasonably prudent steps, when you begin
311distribution of Opaque copies in quantity, to ensure that this
312Transparent copy will remain thus accessible at the stated location
313until at least one year after the last time you distribute an Opaque
314copy (directly or through your agents or retailers) of that edition to
315the public.
316.PP
317It is requested, but not required, that you contact the authors of the
318Document well before redistributing any large number of copies, to give
319them a chance to provide you with an updated version of the Document.
320.PP
3214. MODIFICATIONS
322.PP
323You may copy and distribute a Modified Version of the Document under
324the conditions of sections 2 and 3 above, provided that you release
325the Modified Version under precisely this License, with the Modified
326Version filling the role of the Document, thus licensing distribution
327and modification of the Modified Version to whoever possesses a copy
328of it. In addition, you must do these things in the Modified Version:
329.PP
330A. Use in the Title Page (and on the covers, if any) a title distinct
331from that of the Document, and from those of previous versions
332(which should, if there were any, be listed in the History section
333of the Document). You may use the same title as a previous version
334if the original publisher of that version gives permission.
335.PP
336B. List on the Title Page, as authors, one or more persons or entities
337responsible for authorship of the modifications in the Modified
338Version, together with at least five of the principal authors of the
339Document (all of its principal authors, if it has less than five).
340.PP
341C. State on the Title page the name of the publisher of the
342Modified Version, as the publisher.
343.PP
344D. Preserve all the copyright notices of the Document.
345.PP
346E. Add an appropriate copyright notice for your modifications
347adjacent to the other copyright notices.
348.PP
349F. Include, immediately after the copyright notices, a license notice
350giving the public permission to use the Modified Version under the
351terms of this License, in the form shown in the Addendum below.
352Preserve in that license notice the full lists of Invariant Sections
353and required Cover Texts given in the Document's license notice.
354.PP
355H. Include an unaltered copy of this License.
356.PP
357I. Preserve the section entitled "History", and its title, and add to
358it an item stating at least the title, year, new authors, and
359publisher of the Modified Version as given on the Title Page. If
360there is no section entitled "History" in the Document, create one
361stating the title, year, authors, and publisher of the Document as
362given on its Title Page, then add an item describing the Modified
363Version as stated in the previous sentence.
364.PP
365J. Preserve the network location, if any, given in the Document for
366public access to a Transparent copy of the Document, and likewise
367the network locations given in the Document for previous versions
368it was based on. These may be placed in the "History" section.
369You may omit a network location for a work that was published at
370least four years before the Document itself, or if the original
371publisher of the version it refers to gives permission.
372.PP
373K. In any section entitled "Acknowledgements" or "Dedications",
374preserve the section's title, and preserve in the section all the
375substance and tone of each of the contributor acknowledgements
376and/or dedications given therein.
377.PP
378L. Preserve all the Invariant Sections of the Document,
379unaltered in their text and in their titles. Section numbers
380or the equivalent are not considered part of the section titles.
381.PP
382M. Delete any section entitled "Endorsements". Such a section
383may not be included in the Modified Version.
384.PP
385N. Do not retitle any existing section as "Endorsements"
386or to conflict in title with any Invariant Section.
387.PP
388If the Modified Version includes new front-matter sections or
389appendices that qualify as Secondary Sections and contain no material
390copied from the Document, you may at your option designate some or all
391of these sections as invariant. To do this, add their titles to the
392list of Invariant Sections in the Modified Version's license notice.
393These titles must be distinct from any other section titles.
394.PP
395You may add a section entitled "Endorsements", provided it contains
396nothing but endorsements of your Modified Version by various
397parties--for example, statements of peer review or that the text has
398been approved by an organization as the authoritative definition of a
399standard.
400.PP
401You may add a passage of up to five words as a Front-Cover Text, and a
402passage of up to 25 words as a Back-Cover Text, to the end of the list
403of Cover Texts in the Modified Version. Only one passage of
404Front-Cover Text and one of Back-Cover Text may be added by (or
405through arrangements made by) any one entity. If the Document already
406includes a cover text for the same cover, previously added by you or
407by arrangement made by the same entity you are acting on behalf of,
408you may not add another; but you may replace the old one, on explicit
409permission from the previous publisher that added the old one.
410.PP
411The author(s) and publisher(s) of the Document do not by this License
412give permission to use their names for publicity for or to assert or
413imply endorsement of any Modified Version.
414.PP
415
4165. COMBINING DOCUMENTS
417.PP
418You may combine the Document with other documents released under this
419License, under the terms defined in section 4 above for modified
420versions, provided that you include in the combination all of the
421Invariant Sections of all of the original documents, unmodified, and
422list them all as Invariant Sections of your combined work in its
423license notice.
424.PP
425The combined work need only contain one copy of this License, and
426multiple identical Invariant Sections may be replaced with a single
427copy. If there are multiple Invariant Sections with the same name but
428different contents, make the title of each such section unique by
429adding at the end of it, in parentheses, the name of the original
430author or publisher of that section if known, or else a unique number.
431Make the same adjustment to the section titles in the list of
432Invariant Sections in the license notice of the combined work.
433.PP
434In the combination, you must combine any sections entitled "History"
435in the various original documents, forming one section entitled
436"History"; likewise combine any sections entitled "Acknowledgements",
437and any sections entitled "Dedications". You must delete all sections
438entitled "Endorsements."
439.PP
440
4416. COLLECTIONS OF DOCUMENTS
442.PP
443You may make a collection consisting of the Document and other documents
444released under this License, and replace the individual copies of this
445License in the various documents with a single copy that is included in
446the collection, provided that you follow the rules of this License for
447verbatim copying of each of the documents in all other respects.
448.PP
449You may extract a single document from such a collection, and distribute
450it individually under this License, provided you insert a copy of this
451License into the extracted document, and follow this License in all
452other respects regarding verbatim copying of that document.
453.PP
454
4557. AGGREGATION WITH INDEPENDENT WORKS
456.PP
457A compilation of the Document or its derivatives with other separate
458and independent documents or works, in or on a volume of a storage or
459distribution medium, does not as a whole count as a Modified Version
460of the Document, provided no compilation copyright is claimed for the
461compilation. Such a compilation is called an "aggregate", and this
462License does not apply to the other self-contained works thus compiled
463with the Document, on account of their being thus compiled, if they
464are not themselves derivative works of the Document.
465.PP
466If the Cover Text requirement of section 3 is applicable to these
467copies of the Document, then if the Document is less than one quarter
468of the entire aggregate, the Document's Cover Texts may be placed on
469covers that surround only the Document within the aggregate.
470Otherwise they must appear on covers around the whole aggregate.
471.PP
472
4738. TRANSLATION
474.PP
475Translation is considered a kind of modification, so you may
476distribute translations of the Document under the terms of section 4.
477Replacing Invariant Sections with translations requires special
478permission from their copyright holders, but you may include
479translations of some or all Invariant Sections in addition to the
480original versions of these Invariant Sections. You may include a
481translation of this License provided that you also include the
482original English version of this License. In case of a disagreement
483between the translation and the original English version of this
484License, the original English version will prevail.
485.PP
486
4879. TERMINATION
488.PP
489You may not copy, modify, sublicense, or distribute the Document except
490as expressly provided for under this License. Any other attempt to
491copy, modify, sublicense or distribute the Document is void, and will
492automatically terminate your rights under this License. However,
493parties who have received copies, or rights, from you under this
494License will not have their licenses terminated so long as such
495parties remain in full compliance.
496.PP
497
49810. FUTURE REVISIONS OF THIS LICENSE
499.PP
500The Free Software Foundation may publish new, revised versions
501of the GNU Free Documentation License from time to time. Such new
502versions will be similar in spirit to the present version, but may
503differ in detail to address new problems or concerns. See
504http://www.gnu.org/copyleft/.
505.PP
506Each version of the License is given a distinguishing version number.
507If the Document specifies that a particular numbered version of this
508License "or any later version" applies to it, you have the option of
509following the terms and conditions either of that specified version or
510of any later version that has been published (not as a draft) by the
511Free Software Foundation. If the Document does not specify a version
512number of this License, you may choose any version ever published (not
513as a draft) by the Free Software Foundation.
514.PP
515
516ADDENDUM: How to use this License for your documents
517.PP
518To use this License in a document you have written, include a copy of
519the License in the document and put the following copyright and
520license notices just after the title page:
521.PP
522 Copyright (c) YEAR YOUR NAME.
523 Permission is granted to copy, distribute and/or
524 modify this document under the terms of the GNU
525 Free Documentation License, Version 1.1 or any later
526 version published by the Free Software Foundation;
527 with the Invariant Sections being LIST THEIR TITLES,
528 with the Front-Cover Texts being LIST, and with the
529 Back-Cover Texts being LIST. A copy of the license
530 is included in the section entitled "GNU Free
531 Documentation License".
532.PP
533If you have no Invariant Sections, write "with no Invariant Sections"
534instead of saying which ones are invariant. If you have no
535Front-Cover Texts, write "no Front-Cover Texts" instead of
536"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
537.PP
538If your document contains nontrivial examples of program code, we
539recommend releasing these examples in parallel under your choice of
540free software license, such as the GNU General Public License,
541to permit their use in free software.
This page took 0.189462 seconds and 4 git commands to generate.