Home | History | Annotate | Download | only in man1
 Automatically generated by Pod::Man v1.37, Pod::Parser v1.32

Standard preamble:
========================================================================

\\$1

.. ..

..
.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\}
If the F register is turned on, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.
. de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\}
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.

Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================

Title "STRIP 1"
STRIP 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
"NAME"
strip - Discard symbols from object files.
"SYNOPSIS"
Header "SYNOPSIS" strip [-F bfdname |--target=bfdname] [-I bfdname |--input-target=bfdname] [-O bfdname |--output-target=bfdname] [-s|--strip-all] [-S|-g|-d|--strip-debug] [-K symbolname |--keep-symbol=symbolname] [-N symbolname |--strip-symbol=symbolname] [-w|--wildcard] [-x|--discard-all] [-X |--discard-locals] [-R sectionname |--remove-section=sectionname] [-o file] [-p|--preserve-dates] [--keep-file-symbols] [--only-keep-debug] [-v |--verbose] [-V|--version] [--help] [--info] objfile...
"DESCRIPTION"
Header "DESCRIPTION" \s-1GNU\s0 strip discards all symbols from object files \fIobjfile. The list of object files may include archives. At least one object file must be given.

\fBstrip modifies the files named in its argument, rather than writing modified copies under different names.

"OPTIONS"
Header "OPTIONS"
"-F bfdname" 4
Item "-F bfdname"

0

"--target=bfdname" 4
Item "--target=bfdname"

Treat the original objfile as a file with the object code format bfdname, and rewrite it in the same format.

"--help" 4
Item "--help" Show a summary of the options to strip and exit.
"--info" 4
Item "--info" Display a list showing all architectures and object formats available.
"-I bfdname" 4
Item "-I bfdname"

0

"--input-target=bfdname" 4
Item "--input-target=bfdname"

Treat the original objfile as a file with the object code format bfdname.

"-O bfdname" 4
Item "-O bfdname"

0

"--output-target=bfdname" 4
Item "--output-target=bfdname"

Replace objfile with a file in the output format bfdname.

"-R sectionname" 4
Item "-R sectionname"

0

"--remove-section=sectionname" 4
Item "--remove-section=sectionname"

Remove any section named sectionname from the output file. This option may be given more than once. Note that using this option inappropriately may make the output file unusable.

"-s" 4
Item "-s"

0

"--strip-all" 4
Item "--strip-all"

Remove all symbols.

"-g" 4
Item "-g"

0

"-S" 4
Item "-S"
"-d" 4
Item "-d"
"--strip-debug" 4
Item "--strip-debug"

Remove debugging symbols only.

"--strip-unneeded" 4
Item "--strip-unneeded" Remove all symbols that are not needed for relocation processing.
"-K symbolname" 4
Item "-K symbolname"

0

"--keep-symbol=symbolname" 4
Item "--keep-symbol=symbolname"

When stripping symbols, keep symbol symbolname even if it would normally be stripped. This option may be given more than once.

"-N symbolname" 4
Item "-N symbolname"

0

"--strip-symbol=symbolname" 4
Item "--strip-symbol=symbolname"

Remove symbol symbolname from the source file. This option may be given more than once, and may be combined with strip options other than \fB-K.

"-o file" 4
Item "-o file" Put the stripped output in file, rather than replacing the existing file. When this argument is used, only one objfile argument may be specified.
"-p" 4
Item "-p"

0

"--preserve-dates" 4
Item "--preserve-dates"

Preserve the access and modification dates of the file.

"-w" 4
Item "-w"

0

"--wildcard" 4
Item "--wildcard"

Permit regular expressions in symbolnames used in other command line options. The question mark (?), asterisk (*), backslash (\e) and square brackets ([]) operators can be used anywhere in the symbol name. If the first character of the symbol name is the exclamation point (!) then the sense of the switch is reversed for that symbol. For example: .Sp .Vb 1 -w -K !foo -K fo* .Ve .Sp would cause strip to only keep symbols that start with the letters \*(L"fo\*(R", but to discard the symbol \*(L"foo\*(R".

"-x" 4
Item "-x"

0

"--discard-all" 4
Item "--discard-all"

Remove non-global symbols.

"-X" 4
Item "-X"

0

"--discard-locals" 4
Item "--discard-locals"

Remove compiler-generated local symbols. (These usually start with L or ..)

"--keep-file-symbols" 4
Item "--keep-file-symbols" When stripping a file, perhaps with --strip-debug or \fB--strip-unneeded, retain any symbols specifying source file names, which would otherwise get stripped.
"--only-keep-debug" 4
Item "--only-keep-debug" Strip a file, removing any sections that would be stripped by \fB--strip-debug and leaving the debugging sections. .Sp The intention is that this option will be used in conjunction with \fB--add-gnu-debuglink to create a two part executable. One a stripped binary which will occupy less space in \s-1RAM\s0 and in a distribution and the second a debugging information file which is only needed if debugging abilities are required. The suggested procedure to create these files is as follows:
"1.<Link the executable as normal. Assuming that is is called>" 4
Item "1.<Link the executable as normal. Assuming that is is called>" \f(CW\*(C`foo\*(C' then... Item "1.<Run objcopy --only-keep-debug foo foo.dbg to>" create a file containing the debugging info. Item "1.<Run objcopy --strip-debug foo to create a>" stripped executable. Item "1.<Run objcopy --add-gnu-debuglink=foo.dbg foo>" to add a link to the debugging info into the stripped executable. .Sp Note - the choice of \*(C`.dbg\*(C' as an extension for the debug info file is arbitrary. Also the \*(C`--only-keep-debug\*(C' step is optional. You could instead do this:
"1.<Link the executable as normal.>" 4
Item "1.<Link the executable as normal.>"

0 Item "1.<Copy foo to foo.full>" Item "1.<Run strip --strip-debug foo>" Item "1.<Run objcopy --add-gnu-debuglink=foo.full foo>"

.Sp ie the file pointed to by the --add-gnu-debuglink can be the full executable. It does not have to be a file created by the \fB--only-keep-debug switch.

"-V" 4
Item "-V"

0

"--version" 4
Item "--version"

Show the version number for strip.

"-v" 4
Item "-v"

0

"--verbose" 4
Item "--verbose"

Verbose output: list all object files modified. In the case of archives, strip -v lists all members of the archive.

"@file" 4
Item "@file" Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed. .Sp Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively.
"SEE ALSO"
Header "SEE ALSO" the Info entries for binutils.
"COPYRIGHT"
Header "COPYRIGHT" Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".