LLVM-DWARFUTIL(1)

πŸ’… LLVM-DWARFUTIL(1) β€” the LLVM manual page, bestie edition ✨

okay so you found llvm-dwarfutil, the LLVM tool for copying and manipulating debug info, and you came to the right place. sit down, grab a boba πŸ§‹, we're gonna go through this whole thing together, no cap.


🌸 NAME 🌸

llvm-dwarfutil β€” literally a tool to copy and manipulate debug info. that's it, that's the vibe.


✨ SYNOPSIS ✨

llvm-dwarfutil [options] input output

πŸ¦‹ DESCRIPTION πŸ¦‹

so, llvm-dwarfutil is a tool to copy and manipulate debug info. πŸŽ€

in basic usage, it makes a semantic copy of the input to the output. and if you specify any options, the output may be modified along the way β€” e.g. by removing unused debug info. cute, right? it's giving glow-up for your binary.

if - is specified for the input file, the input is read from the program's standard input stream. if - is specified for the output file, the output is written to the standard output stream of the program. pipes, bestie. iconic. 🫢

⚠️ heads up: the tool is still in active development. so like, it's in its formative era. be nice to it. 😭

πŸ‘‘ COMMAND-LINE OPTIONS πŸ‘‘

  • --garbage-collection β€” removes pieces of debug information related to discarded sections. here's the situation: when the linker does section garbage collection, the abandoned debug info is left behind, and that abandoned debug info references address ranges using tombstone values. so, when this option is specified, the tool removes debug info which is marked with the tombstone value. πŸͺ¦βœ¨

that option is enabled by default.

  • --odr-deduplication β€” removes duplicated types (if "One Definition Rule" is supported by source language). it keeps the first type definition and removes the other definitions, potentially significantly reducing the size of output debug info. lowkey a size queen move and we love that for it. πŸ’…

that option is enabled by default.

  • --help, -h β€” print a summary of command line options. your classic cry-for-help-but-make-it-documentation moment.
  • --no-garbage-collection β€” disable --garbage-collection. that's it. that's the whole thing.
  • --no-odr-deduplication β€” disable --odr-deduplication. turn the dedupe off, live your truth.
  • --no-separate-debug-file β€” disable --separate-debug-file.
  • --num-threads=<n>, -j β€” specifies the maximum number (n) of simultaneous threads to use for processing. multitasking era. πŸ”₯
  • --separate-debug-file β€” generate separate file containing output debug info. using llvm-dwarfutil with that option equals to the following set of commands:
llvm-objcopy --only-keep-debug in-file out-file.debug
llvm-objcopy --strip-debug in-file out-file
llvm-objcopy --add-gnu-debuglink=out-file.debug out-file
  • --tombstone=<value> β€” <value> can be one of the following values:
    • bfd: zero for all addresses and [1,1] for DWARF v4 (or less) address ranges and exec.
    • maxpc: -1 for all addresses and -2 for DWARF v4 (or less) address ranges.
    • universal: both bfd and maxpc.
    • exec: match with address ranges of executable sections.

the value universal is used by default. πŸͺ¦β­

  • --verbose β€” enable verbose logging. this option disables multi-thread mode. ngl she talks so much she can only do one thing at a time 😭
  • --verify β€” run the DWARF verifier on the output DWARF debug info. vibe check but for DWARF. πŸ’€
  • --version β€” print the version of this program.

🌈 SUPPORTED FORMATS 🌈

the following formats are currently supported by llvm-dwarfutil:

  • ELF

(just ELF. she's monogamous. πŸ’œ)


⭐ EXIT STATUS ⭐

llvm-dwarfutil exits with a non-zero exit code if there is an error. otherwise, it exits with code 0. slay. clean exit, clear skin, hydrated, happy. ✨


πŸ™ˆ BUGS πŸ™ˆ

to report bugs, please visit:

https://github.com/llvm/llvm-project/labels/tools:llvm-dwarfutil/

πŸŽ€ Author πŸŽ€

maintained by the LLVM Team (https://llvm.org/). besties fr fr.


2003-2026, LLVM Project


and that's the whole page! πŸ’– this version is LLVM-DWARFUTIL(1), page 15, dated 2026-09-09 β€” write that down, put it in your notes app, print it out and tape it to your monitor. go forth and dedupe those types, bestie. πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from