OS Manuals

/usr/bin/strip

GNU binutils

From binutils 2.47-r4 (os), captured 2026-11-10 by running strip --help (exit 0). permalink

Also provided by 1 other package version
Usage: /usr/bin/strip <option(s)> in-file(s)
 Removes symbols and sections from files
 The options are:
  -I --input-target=<bfdname>      Assume input file is in format <bfdname>
  -O --output-target=<bfdname>     Create an output file in format <bfdname>
  -F --target=<bfdname>            Set both input and output format to <bfdname>
  -p --preserve-dates              Copy modified/access timestamps to the output
  -D --enable-deterministic-archives
                                   Produce deterministic output when stripping archives (default)
  -U --disable-deterministic-archives
                                   Disable -D behavior
  -R --remove-section=<name>       Also remove section <name> from the output
     --remove-relocations <name>   Remove relocations from section <name>
     --strip-section-headers       Strip section headers from the output
  -s --strip-all                   Remove all symbol and relocation information
  -g -S -d --strip-debug           Remove all debugging symbols & sections
     --strip-dwo                   Remove all DWO sections
     --strip-unneeded              Remove all symbols not needed by relocations
     --only-keep-debug             Strip everything but the debug information
  -M  --merge-notes                Remove redundant entries in note sections (default)
      --no-merge-notes             Do not attempt to remove redundant notes
  -N --strip-symbol=<name>         Do not copy symbol <name>
     --keep-section=<name>         Do not strip section <name>
  -K --keep-symbol=<name>          Do not strip symbol <name>
     --keep-section-symbols        Do not strip section symbols
     --keep-file-symbols           Do not strip file symbol(s)
  -w --wildcard                    Permit wildcard in symbol comparison
  -x --discard-all                 Remove all non-global symbols
  -X --discard-locals              Remove any compiler-generated symbols
  -v --verbose                     List all object files modified
  -V --version                     Display this program's version number
  -h --help                        Display this output
     --info                        List object formats & architectures supported
  -o <file>                        Place stripped output into <file>
      --plugin NAME                Load the specified plugin
/usr/bin/strip: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64 pei-i386 pe-x86-64 pei-x86-64 elf64-little elf64-big elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin
Report bugs to <https://sourceware.org/bugzilla/>
Options (50)
OptionDescriptionSource
-I --input-target=<bfdnameAssume input file is in format <bfdname>help + man
-O --output-target=<bfdnameCreate an output file in format <bfdname>help + man
-F --target=<bfdnameSet both input and output format to <bfdname>help + man
-p --preserve-datesCopy modified/access timestamps to the outputhelp + man
-D --enable-deterministic-archivesProduce deterministic output when stripping archives (default)help + man
-U --disable-deterministic-archivesDisable -D behaviorhelp + man
-R --remove-section=<nameAlso remove section <name> from the outputhelp + man
--remove-relocations nameRemove relocations from the output file for any section matching sectionpattern.help + man
--strip-section-headersStrip section headers from the outputhelp + man
-s --strip-allRemove all symbol and relocation informationhelp + man
-g -SRemove all debugging symbols & sectionshelp + man
--strip-dwoRemove the contents of all DWARF .dwo sections, leaving the remaining debugging sections and all symbols intact.help + man
--strip-unneededRemove all symbols that are not needed for relocation processing in addition to debugging symbols and sections stripped by --strip-debug.help + man
--only-keep-debugStrip a file, emptying the contents of any sections that would not be stripped by --strip-debug and leaving the debugging sections intact.help + man
-M--merge-notes Remove redundant entries in note sections (default)help + man
--no-merge-notesFor ELF files, attempt (or do not attempt) to reduce the size of any SHT_NOTE type sections by removing duplicate notes.help + man
-N --strip-symbol=<nameDo not copy symbol <name>help + man
--keep-section nameWhen removing sections from the output file, keep sections that match sectionpattern.help + man
-K --keep-symbol=<nameDo not strip symbol <name>help + man
--keep-section-symbolsWhen stripping a file, perhaps with --strip-debug or --strip-unneeded, retain any symbols specifying section names, which would otherwise get stripped.help + man
--keep-file-symbolsWhen stripping a file, perhaps with --strip-debug or --strip-unneeded, retain any symbols specifying source file names, which would otherwise get stripped.help + man
-w --wildcardPermit wildcard in symbol comparisonhelp + man
-x --discard-allRemove all non-global symbolshelp + man
-X --discard-localsRemove any compiler-generated symbolshelp + man
-v --verboseList all object files modifiedhelp + man
-V --versionDisplay this program's version numberhelp + man
-h --helpDisplay this outputhelp
--infoDisplay a list showing all architectures and object formats available.help + man
-o filePut the stripped output in file, rather than replacing the existing file.help + man
--plugin NAMELoad the plugin called name to add support for extra target types.help + man
--target bfdnameTreat the original objfile as a file with the object code format bfdname, and rewrite it in the same format. (in the manual page but not in --help)man
--helpShow a summary of the options to strip and exit. (in the manual page but not in --help)man
--input-target bfdnameTreat the original objfile as a file with the object code format bfdname. (in the manual page but not in --help)man
--output-target bfdnameReplace objfile with a file in the output format bfdname. (in the manual page but not in --help)man
--remove-section sectionnameRemove any section named sectionname from the output file, in addition to whatever sections would otherwise be removed. (in the manual page but not in --help)man
--strip-allRemove all symbols. (in the manual page but not in --help)man
-S (in the manual page but not in --help)man
-d (in the manual page but not in --help)man
--strip-debugRemove debugging symbols only. (in the manual page but not in --help)man
--keep-symbol symbolnameWhen stripping symbols, keep symbol symbolname even if it would normally be stripped. (in the manual page but not in --help)man
--merge-notes (in the manual page but not in --help)man
--strip-symbol symbolnameRemove symbol symbolname from the source file. (in the manual page but not in --help)man
--preserve-datesPreserve the access and modification dates of the file. (in the manual page but not in --help)man
--enable-deterministic-archivesOperate in deterministic mode. (in the manual page but not in --help)man
--disable-deterministic-archivesDo not operate in deterministic mode. (in the manual page but not in --help)man
--wildcardPermit regular expressions in symbolnames used in other command line options. (in the manual page but not in --help)man
--discard-allRemove non-global symbols. (in the manual page but not in --help)man
--discard-localsRemove compiler-generated local symbols. (in the manual page but not in --help)man
--versionShow the version number for strip. (in the manual page but not in --help)man
--verboseVerbose output: list all object files modified. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.