LLVM-STRIP(1)

πŸ’… LLVM-STRIP β€” the glow-up guide ✨

okay so this is the manual page for llvm-strip from LLVM, and bestie, it's about to be your new fave ✨


πŸŽ€ NAME πŸŽ€

llvm-strip β€” the object stripping tool. yeah. that's her. she strips sections and symbols and she does it gorgeously πŸ’…


⭐ SYNOPSIS ⭐

llvm-strip [options] inputs...

πŸ¦‹ DESCRIPTION πŸ¦‹

So llvm-strip is literally a tool to strip sections and symbols from object files. If you don't pass any other stripping or remove options, --strip-all gets enabled automatically β€” she just goes full send by default, no cap.

By default, the input files are modified in-place (yes, bestie, she edits the original β€” hydrate and back up accordingly πŸ™ˆ). But if - is specified for the input file, the input is read from the program's standard input stream instead. cute.

If the input is an archive, any requested operations will be applied to each archive member individually β€” one glow-up per member, everyone eats πŸ“

The tool is still in active development, but in most scenarios it works as a drop-in replacement for GNU's strip. lowkey iconic behavior.


🌈 GENERIC AND CROSS-PLATFORM OPTIONS 🌈

These following options are either agnostic of the file format, or apply to multiple file formats. equal-opportunity queens πŸ‘‘

  • --disable-deterministic-archives, -U β€” use real values for UIDs, GIDs and timestamps when updating archive member headers. no fake numbers, all real ones.
  • --discard-all, -x β€” remove most local symbols not referenced by relocations from the output. Different file formats may limit this to a subset of the local symbols β€” for example, file and section symbols in ELF objects will not be discarded. Additionally, remove all debug sections. bye debug info 🫢
  • --enable-deterministic-archives, -D β€” enable deterministic mode when stripping archives, i.e. use 0 for archive member header UIDs, GIDs and timestamp fields. On by default. consistent, stable, reliable β€” the whole vibe πŸ’œ
  • --help, -h β€” print a summary of command line options. when in doubt, ask for help. queen behavior.
  • --no-strip-all β€” disable --strip-all. she was gonna strip everything, but you said no, and she respects that πŸ’…
  • -o <file> β€” write output to <file>. Multiple input files cannot be used in combination with -o β€” it's a one-on-one situation, no group hangouts.
  • --only-keep-debug β€” produce a debug file as the output that only preserves contents of sections useful for debugging purposes. For ELF objects, this removes the contents of SHF_ALLOC sections that are not SHT_NOTE by making them SHT_NOBITS and shrinking the program headers where possible. keeping only the useful parts, we love a minimalist ✨
  • --regex β€” if specified, symbol and section names specified by other switches are treated as extended POSIX regular expression patterns. regex girlies rise 🧚
  • --remove-section <section>, -R β€” remove the specified section from the output. Can be specified multiple times to remove multiple sections simultaneously. stack the flags, collect the removals.
  • --strip-all-gnu β€” remove all symbols, debug sections and relocations from the output. This option is equivalent to GNU strip's --strip-all switch. same energy, different font.
  • --strip-all, -s β€” for ELF objects, remove from the output all symbols and non-alloc sections not within segments, except for .gnu.warning, .ARM.attribute sections and the section name table. For COFF objects, remove all symbols, debug sections, and relocations from the output. she takes everything except the exemptions, and the exemptions are protected, periodt.
  • --strip-debug, -d, -g, -S β€” remove all debug sections from the output. four whole aliases for one slay.
  • --strip-symbol <symbol>, -N β€” remove all symbols named <symbol> from the output. Can be specified multiple times to remove multiple symbols.
  • --strip-unneeded β€” remove from the output all local or undefined symbols that are not required by relocations. Also remove all debug sections. if you're not needed you're not staying πŸ’€
  • --version, -V β€” display the version of the llvm-strip executable.
  • --wildcard, -w β€” allow wildcard syntax for symbol-related flags. On by default for section-related flags. Incompatible with --regex β€” pick a lane, bestie, you can't have both.

Wildcard syntax allows the following special symbols:

  • * β€” any number of characters β€” equivalent to .*
  • ? β€” any single character β€” equivalent to .
  • \ β€” escape the next character β€” equivalent to \
  • [a-z] β€” character class β€” equivalent to [a-z]
  • [!a-z], [^a-z] β€” negated character class β€” equivalent to [^a-z]

Additionally, starting a wildcard with ! will prevent a match, even if another flag matches. For example -w -N '*' -N '!x' will strip all symbols except for x. the ! is the "not you, girl" of wildcards πŸ™ˆ

The order of wildcards does not matter. For example, -w -N '*' -N '!x' is the same as -w -N '!x' -N '*'. order is a social construct here.

  • @<FILE> β€” read command-line options and commands from response file <FILE>. she'll read your whole note, no need to retype it.

🧚 ELF-SPECIFIC OPTIONS 🧚

The following options are implemented only for ELF objects. If used with other objects, llvm-strip will either emit an error or silently ignore them. so… ELF girlies only, everyone else gets a shoulder shrug 😭

  • --allow-broken-links β€” allow llvm-strip to remove sections even if it would leave invalid section references. Any invalid sh_link fields will be set to zero. broken links but make it intentional πŸ’…
  • --discard-locals, -X β€” remove local symbols starting with ".L" not referenced by relocations from the output.
  • --keep-file-symbols β€” keep symbols of type STT_FILE, even if they would otherwise be stripped. protect them 🫢
  • --keep-section <section> β€” when removing sections from the output, do not remove sections named <section>. Can be specified multiple times to keep multiple sections.
  • --keep-symbol <symbol>, -K β€” when removing symbols from the output, do not remove symbols named <symbol>. Can be specified multiple times to keep multiple symbols.
  • --preserve-dates, -p β€” preserve access and modification timestamps in the output. she remembers when you last changed, and she respects it ⭐
  • --strip-sections β€” remove from the output all section headers and all section data not within segments. Note that many tools will not be able to use an object without section headers. ⚠️ heads up bestie, this one has consequences.
  • -T β€” remove Swift symbols. sorry swifties πŸ’€

🌸 EXIT STATUS 🌸

llvm-strip exits with a non-zero exit code if there is an error. Otherwise, it exits with code 0. clean exit, clear skin, no drama ✨


πŸ’€ BUGS πŸ’€

To report bugs, please visit https://github.com/llvm/llvm-project/labels/tools:llvm-objcopy%2Fstrip. the devs want to know, fr fr.


πŸ‘‘ SEE ALSO πŸ‘‘

  • llvm-objcopy(1) β€” the sibling, the co-star, the other main character.

πŸŽ€ Author πŸŽ€

Maintained by the LLVM Team (https://llvm.org/). please thank them πŸ™

2003-2026, LLVM Project


okay that's the whole page, bestie πŸ’– you're now fully certified in the art of stripping. mwah 🫢

page 21, dated 2026-05-15, from the LLVM-STRIP(1) manual β€” love u, go strip something iconic 🌈
πŸ“¦ where this page comes from