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). --extract-section=section=file Extract section named
into standalone object in file -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
--keep-symbol=symbol When removing symbols, do not remove -K Alias for --keep-symbol --no-strip-all Disable --strip-all -N 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 Write output to --preserve-dates Preserve access and modification timestamps -p Alias for --preserve-dates --regex Permit regular expressions in name comparison --remove-section=section Remove
-R 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. For WebAssembly, remove all custom sections except for metadata.code.* --strip-debug Remove all debug sections --strip-sections Remove all section headers and all section data not within segments --strip-symbol=symbol Strip --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 --verbose Print the paths of files that are copied --version Print the version and exit. -V Alias for --version -v Alias for --verbose --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.