[Previous] [Contents] [Index] [Next]

strip

Remove unnecessary information from executable files (POSIX)

Syntax:

strip [ -F bfdname ]
      [ -I bfdname ]
      [ -O bfdname ]
      [ -s ] [ -S | -g ]
      [ --strip-unneeded ]
      [ -K symbolname ]
      [ -N symbolname ]
      [ -x ] [ -X ]
      [ -R sectionname ]
      [ -o file ] [ -p ]
      [ -v ]  [ -V ]  [ --help ]
      objfile...

Options:

-F bfdname
Treat the original objfile as a file with the object code format bfdname, and rewrite it in the same format. For more information, see "Target Selection" in the appendix Selecting the Target System.
-I bfdname
Treat the original objfile as a file with the object code format bfdname. For more information, see "Target Selection" in the appendix Selecting the Target System.
-O bfdname
Replace objfile with a file in the output format bfdname. For more information, see "Target Selection" in the appendix Selecting the Target System.
-R 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
Remove all symbols.
-g
-S
Remove debugging symbols only.
-K symbolname
Keep only symbol symbolname from the source file. This option may be given more than once.
-N 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 -K.
-o file
Put the stripped output in file, rather than replace the existing file. When this argument is used, only one objfile argument may be specified.
-p
Preserve the access and modification dates of the file.
-x
Remove nonglobal symbols.
-X
Remove compiler-generated local symbols. (These usually start with L or ..)
-V
Show the version number for strip.
-v
Verbose output: list all object files modified. In the case of archives, strip -v lists all members of the archive.

GNU extensions

--help
Show a summary of the options to strip and exit.
--strip-unneeded
Remove all symbols that aren't needed for relocation processing.

Description:

The strip utility discards all symbols from object files objfile. The list of object files may include archives. At least one object file must be given.

This utility modifies the files named in its argument instead of writing modified copies under different names.

Author:

GNU


[Previous] [Contents] [Index] [Next]