LLVM-STRIP(1)
π
LLVM-STRIP (1) β the llvm-strip girlies' guide β¨
okay so bestie, welcome to the LLVM manual page for llvm-strip β yes, the manual name is literally LLVM-STRIP and it's giving "section 1, we're doing this" π
πΈ NAME πΈ
llvm-strip β object stripping tool. that's it, that's the elevator pitch, and honestly? iconic π«Ά
β¨ SYNOPSIS β¨
llvm-strip [options] inputs...
π¦ DESCRIPTION π¦
so llvm-strip is a tool to strip sections and symbols from object files. if you don't specify any other stripping or remove options, --strip-all gets enabled automatically β it's literally the default main character energy π
by default, the input files are modified in-place. (yes, in place. keep that in mind, bestie, we're not doing backup vibes here π) but if you specify - for the input file, the input gets read from the program's standard input stream instead β cute little pipe moment π
if the input is an archive, any requested operations get applied to each archive member individually. no member left behind, periodt.
the tool is still in active development, but in most scenarios it works as a drop-in replacement for GNU's strip. slay π
π GENERIC AND CROSS-PLATFORM OPTIONS π
the following options are either agnostic of the file format, or apply to multiple file formats. equal opportunity options fr fr π
--disable-deterministic-archives,-Uβ use real values for UIDs, GIDs and timestamps when updating archive member headers. no fake-outs, we're being honest here β¨--discard-all,-xβ remove most local symbols 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, sorry babe π additionally, remove all debug sections. double duty, we love to see it.--enable-deterministic-archives,-Dβ enable deterministic mode when stripping archives, i.e. use0for archive member header UIDs, GIDs and timestamp fields. this one is on by default π--help,-hβ print a summary of command line options. when in doubt, ask for help, that's growth π--no-strip-allβ disable--strip-all. the off switch for the default, lowkey powerful.-ofileβ write output tofile. multiple input files cannot be used in combination with-oβ it's a one-on-one situation, no group chats allowed π--only-keep-debugβ produce a debug file as the output that only preserves contents of sections useful for debugging purposes. very "just the essentials" of it all. for ELF objects, this removes the contents ofSHF_ALLOCsections that are notSHT_NOTEby making themSHT_NOBITSand shrinking the program headers where possible. look at her go π₯--regexβ if specified, symbol and section names specified by other switches are treated as extended POSIX regular expression patterns. regex girlies, this one's for you π§--remove-sectionsection,-Rβ remove the specified section from the output. can be specified multiple times to remove multiple sections simultaneously. stack 'em π--strip-all-gnuβ remove all symbols, debug sections and relocations from the output. this option is equivalent to GNUstrip'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. (yes, those three get to stay, they're the favourites π₯Ί) for COFF objects, remove all symbols, debug sections, and relocations from the output.--strip-debug,-d,-g,-Sβ remove all debug sections from the output. four whole flags for one job, and honestly? she contains multitudes π--strip-symbolsymbol,-Nβ remove all symbols namedsymbolfrom the output. can be specified multiple times to remove multiple symbols. bye bestie π--strip-unneededβ remove from the output all local or undefined symbols that are not required by relocations. also remove all debug sections. unneeded behaviour only, we're decluttering πΈ--version,-Vβ display the version of thellvm-stripexecutable. know your queen's birthday π--wildcard,-wβ allow wildcard syntax for symbol-related flags. on by default for section-related flags. incompatible with--regex. (pick a lane, babe, 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 audacity, the precision, we stan π
the order of wildcards does not matter. for example -w -N '*' -N '!x' is the same as -w -N '!x' -N '*'. chaotic neutral but make it deterministic β¨
@FILEβ read command-line options and commands from response fileFILE. a whole file of options, that's the group chat right there π«Ά
π 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 β she's flexible like that, but also she'll just not π
--allow-broken-linksβ allowllvm-stripto remove sections even if it would leave invalid section references. any invalidsh_linkfields will be set to zero. chaotic, but consensual π--discard-locals,-Xβ remove local symbols starting with".L"from the output. very specific, very demure π--keep-file-symbolsβ keep symbols of typeSTT_FILE, even if they would otherwise be stripped. protection squad activated π‘οΈ--keep-sectionsectionβ when removing sections from the output, do not remove sections namedsection. can be specified multiple times to keep multiple sections. the VIP list ποΈ--keep-symbolsymbol,-Kβ when removing symbols from the output, do not remove symbols namedsymbol. can be specified multiple times to keep multiple symbols. same VIP list, different guest list π--preserve-dates,-pβ preserve access and modification timestamps in the output. respect the origin story β°--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 β like, seriously bestie, this one's a commitment π-Tβ remove Swift symbols. swiftie erasure, literally π«Ά
β EXIT STATUS β
llvm-strip exits with a non-zero exit code if there is an error. otherwise, it exits with code 0. simple, clean, no drama (unless there's an error, then there's drama) π
π BUGS π
to report bugs, please visit https://github.com/llvm/llvm-project/labels/tools:llvm-objcopy%2Fstrip. tell them we said hi π
π SEE ALSO π
llvm-objcopy(1) <llvm-objcopy.html> β her sister, her collaborator, her other half π¦
πΈ Author πΈ
maintained by the LLVM Team (https://llvm.org/). the actual legends β¨
π Copyright π
2003-2026, LLVM Project
and that's the whole page, bestie! π
this edition is version 15, dated 2026-09-09, and it's the LLVM-STRIP(1) page from the LLVM manual collection β go forth and strip responsibly, ily π«Άπβ¨
π¦ where this page comes from
- ubuntu stonking: llvm-18 1:18.1.8-20ubuntu11 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms