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. use0for 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 ofSHF_ALLOCsections that are notSHT_NOTEby making themSHT_NOBITSand 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-allswitch. 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.attributesections 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 thellvm-stripexecutable.--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β allowllvm-stripto remove sections even if it would leave invalid section references. Any invalidsh_linkfields 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 typeSTT_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 π
π Copyright π
2003-2026, LLVM Project
okay that's the whole page, bestie π you're now fully certified in the art of stripping. mwah π«Ά
page21, dated2026-05-15, from theLLVM-STRIP(1)manual β love u, go strip something iconic π
π¦ where this page comes from
- fedora 44: llvm21 21.1.8-5.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm21 21.1.8-5.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms