man.bsd.lv manual page server

Manual Page Search Parameters

STRIP(1) General Commands Manual STRIP(1)

stripdiscard information from ELF objects

strip [-d | -g | -S | --strip-debug] [-h | --help] [--only-keep-debug] [-o outputfile | --output-file=outputfile] [-p | --preserve-dates] [-s | --strip-all] [--strip-unneeded] [-w | --wildcard] [-x | --discard-all] [-I format | --input-target=format] [-K symbol | --keep-symbol=symbol] [-N symbol | --strip-symbol=symbol] [-O format | --output-target=format] [-R sectionname | --remove-section=sectionname] [-V | --version] [-X | --discard-locals] file ...

The strip utility is used to discard information from the ELF objects specified by the arguments file ....

If an explicit output file name is not specified using the -o option, the strip utility will modify its input arguments in-place.

The strip utility supports the following options:

| | |
Remove debugging symbols only.
|
Print a help message and exit.
Remove all content except that which would be used for debugging.
outputfile | outputfile
Write the stripped object to file outputfile instead of modifying the input in-place. Only a single input object should be specified if this option is used.
|
Preserve the object's access and modification times.
|
Remove all symbols.
Remove all symbols not needed for further relocation processing.
|
Use shell-style patterns to name symbols. The following meta-characters are recognized in patterns:
!
If this is the first character of the pattern, invert the sense of the pattern match.
Matches any string of characters in a symbol name.
?
Matches zero or one character in a symbol name.
[
Mark the start of a character class.
\
Remove the special meaning of the next character in the pattern.
]
Mark the end of a character class.
|
Discard all non-global symbols.
format | format
These options are accepted, but are ignored.
symbol | symbol
Keep the symbol symbol even if it would otherwise be stripped. This option may be specified multiple times.
symbol | symbol
Remove the symbol symbol even if it would otherwise have been kept. This option may be specified multiple times.
format | format
Set the output file format to format. For the full list of supported formats, please see the documentation for function elftc_bfd_find_target(3).
sectionname | sectionname
Remove the section named by the argument sectionname. This option may be specified multiple times.
|
Print a version identifier and exit.
|
Remove compiler-generated local symbols.

The strip utility exits 0 on success, and >0 if an error occurs.

ar(1), elfcopy(1), ld(1), mcs(1), elf(3), elftc_bfd_find_target(3), fnmatch(3)

July 27, 2019 FreeBSD-13.0