strip

Name

strip -- remove unnecessary information from executable files

Description

strip is as specified in the SUS but with differences as listed below.

LSB Deprecated Differences

The behaviors specified in this section are expected to disappear from a future version of the LSB; applications should only use the non-LSB-deprecated behaviors.

-F bdfname, --target=bfdname

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

-I bfdname, --input-target=bfdname

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

-O bdfname, --output-target=bfdname

replaces objfile with a file in the output format bfdname.

-R sectionname, --remove-section=sectionname

removes the named section from the file. This option may be given more than once. Note that using this option inappropriately may make the object file unusable.

-s, --strip-all

removes all symbols.

-S, -g, --strip-debug

removes debugging symbols only.

--strip-unneeded

strips all symbols that are not needed for relocation processing.

-N symbolname, --strip-symbol=symbolname

removes symbol symbolname from the source file. This option may be given more than once, and may be combined with other strip options.

-o file

puts the stripped output in file, rather than replacing the existing file. When this argument is used, only one objfile argument may be specified.

-p, --preserve-dates

preserves the access and modification dates of the file.

-x, --discard-all

removes non-global symbols.

-X, --discard-locals

removes compiler-generated local symbols. (These usually start with `L' or `.'.)

-K symbolname, --keep-symbol=symbolname

copies only symbol symbolname from the source file. This option may be given more than once.

-N symbolname, --strip-symbol=symbolname

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

-v, --verbose

lists all object files modified. In the case of archives, lists all members of the archive.

--version

shows the version number for strip and exits.