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