OS Manuals

/usr/lib/llvm-19/bin/llvm-strip

Low-level virtual machine 19 - core frameworks

From llvm-19 19.1.7-r31 (os), captured 2026-11-05 by running llvm-strip --help (exit 0). permalink

Also provided by 1 other package version
OVERVIEW: llvm-strip tool

USAGE: llvm-strip [options] inputs...

OPTIONS:
  --allow-broken-links   Allow the tool to remove sections even if it would leave invalid section references. The appropriate sh_link fields will be set to zero.
  --disable-deterministic-archives
                         Disable deterministic mode when operating on archives (use real values for UIDs, GIDs, and timestamps).
  --discard-all          Remove most local symbols. Different file formats may limit this to a subset. For ELF, file and section symbols are not discarded. Additionally, remove all debug sections
  --discard-locals       Remove local symbols starting with .L
  -D                     Alias for --enable-deterministic-archives
  -d                     Alias for --strip-debug
  --enable-deterministic-archives
                         Enable deterministic mode when operating on archives (use zero for UIDs, GIDs, and timestamps).
  -g                     Alias for --strip-debug
  --keep-file-symbols    Keep symbols of type STT_FILE, even if they would otherwise be stripped
  --keep-section=section Keep <section>
  --keep-symbol=symbol   When removing symbols, do not remove <symbol>
  -K <value>             Alias for --keep-symbol
  --no-strip-all         Disable --strip-all
  -N <value>             Alias for --strip-symbol
  --only-keep-debug      Produce a debug file as the output that only preserves contents of sections useful for debugging purposes
  -o <file>              Write output to <file>
  --preserve-dates       Preserve access and modification timestamps
  -p                     Alias for --preserve-dates
  --regex                Permit regular expressions in name comparison
  --remove-section=section
                         Remove <section>
  -R <value>             Alias for --remove-section
  --strip-all-gnu        Remove all symbols, debug sections and relocations. Compatible with GNU's --strip-all
  --strip-all            For ELF, remove all symbols and non-alloc sections not within segments, except for .gnu.warning*, .ARM.attribute, and the section name table. For COFF and Mach-O, remove all symbols, debug sections, and relocations
  --strip-debug          Remove all debug sections
  --strip-sections       Remove all section headers and all section data not within segments
  --strip-symbol=symbol  Strip <symbol>
  --strip-unneeded       Remove all symbols not needed by relocations
  -S                     Alias for --strip-debug
  -s                     Alias for --strip-all
  -T                     Remove Swift symbols
  -U                     Alias for --disable-deterministic-archives
  --version              Print the version and exit.
  -V                     Alias for --version
  --wildcard             Allow wildcard syntax for symbol-related flags. Incompatible with --regex. Allows using '*' to match any number of characters, '?' to match any single character, '' to escape special characters, and '[]' to define character classes. Wildcards beginning with '!' will prevent a match, for example "-N '*' -N '!x'" will strip all symbols except for "x".
  -w                     Alias for --wildcard
  -X                     Alias for --discard-locals
  -x                     Alias for --discard-all

OPTIONS (Mach-O specific):
  --keep-undefined Do not remove undefined symbols

Pass @FILE as argument to read options from FILE.
Options (36)
OptionDescriptionSource
--allow-broken-linksAllow the tool to remove sections even if it would leave invalid section references.help
--disable-deterministic-archivesDisable deterministic mode when operating on archives (use real values for UIDs, GIDs, and timestamps).help
--discard-allRemove most local symbols.help
--discard-localsRemove local symbols starting with .Lhelp
-DAlias for --enable-deterministic-archiveshelp
-dAlias for --strip-debughelp
--enable-deterministic-archivesEnable deterministic mode when operating on archives (use zero for UIDs, GIDs, and timestamps).help
-gAlias for --strip-debughelp
--keep-file-symbolsKeep symbols of type STT_FILE, even if they would otherwise be strippedhelp
--keep-symbol symbolWhen removing symbols, do not remove <symbol>help
-K valueAlias for --keep-symbolhelp
--no-strip-allDisable --strip-allhelp
-N valueAlias for --strip-symbolhelp
--only-keep-debugProduce a debug file as the output that only preserves contents of sections useful for debugging purposeshelp
-o fileWrite output to <file>help
--preserve-datesPreserve access and modification timestampshelp
-pAlias for --preserve-dateshelp
--regexPermit regular expressions in name comparisonhelp
--remove-section sectionRemove <section>help
-R valueAlias for --remove-sectionhelp
--strip-all-gnuRemove all symbols, debug sections and relocations.help
--strip-allFor ELF, remove all symbols and non-alloc sections not within segments, except for .gnu.warning*, .ARM.attribute, and the section name table.help
--strip-debugRemove all debug sectionshelp
--strip-sectionsRemove all section headers and all section data not within segmentshelp
--strip-symbol symbolStrip <symbol>help
--strip-unneededRemove all symbols not needed by relocationshelp
-SAlias for --strip-debughelp
-sAlias for --strip-allhelp
-TRemove Swift symbolshelp
-UAlias for --disable-deterministic-archiveshelp
--versionPrint the version and exit.help
-VAlias for --versionhelp
--wildcardAllow wildcard syntax for symbol-related flags.help
-wAlias for --wildcardhelp
-XAlias for --discard-localshelp
-xAlias for --discard-allhelp

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