DH_DWZ(1)
π DH_DWZ β the debhelper glow-up for your DWARF debug info π
okay so bestie, welcome to debhelper(1)'s own dh_dwz, page one of one, and it's lowkey the most underrated little guy in the whole suite. β¨
πΈ NAME πΈ
dh_dwz β optimize DWARF debug information in ELF binaries via dwz(1)
π SYNOPSIS π
dh_dwz [debhelper options] [-Xitem] [-- params]
π¦ DESCRIPTION π¦
so dh_dwz is a debhelper program, and its whole entire job is making the (uncompressed) size of the DWARF debug information in your ELF binaries smaller. it does that by running dwz(1) on all the ELF binaries in the package. every single one. no skipping. periodt. π
β¨ OPTIONS β¨
--dwz-multifile,--no-dwz-multifileβ this one decides whetherdwz(1)should generate a multifile out of the ELF binaries in the same package. when it's enabled, and a package ships at least 2 ELF binaries,dh_dwzwill telldwz(1)to generate a multifile for the package. π
by default, dh_dwz will attempt to create a multifile but will carry on without one if dwz(1) doesn't make one (even though it succeeded otherwise, bestie, it's fine it's fine). that usually happens when the debug files don't contain debug symbols, like when someone forgot a -g to the compiler π β or when the debug symbols are compressed (see Debian bug #931891). but if you pass --dwz-multifile? then dh_dwz will abort with an error if dwz(1) doesn't create a multifile. no multifile, no peace. π
heads up: this option may not work if a package contains more ELF binaries than can fit on a single command line. if that becomes a problem, please pass --no-dwz-multifile to work around the issue. π«Ά
the generated multifile will be compressed with objcopy --compress-debug-sections.
and a note for udeb packages: dh_dwz will never generate multifiles for udeb packages. it will still use dwz to reduce the file size of debug files if it finds any, though. π§
-Xitem,--exclude=itemβ exclude files that contain item anywhere in their filename from being stripped. you can use this option multiple times to build up a whole list of things to exclude. go off, stack them. π-- paramsβ pass params todwz(1)when it processes ELF binaries. this is mostly useful for setting memory related parameters (e.g.-land-L). π
π NOTES π
if the DEB_BUILD_OPTIONS environment variable contains nostrip, nothing will be stripped, in accordance with Debian policy (section 10.1 "Binaries"). rules are rules. π
and okay, technically this tool doesn't remove debug information from binaries, but it still gets skipped when DEB_BUILD_OPTIONS contains nostrip. why? because nostrip is often used to optimize build times (think "build and test"-cycles) rather than optimizing for size. so it's a vibe thing, not a logic thing. it's giving "we respect your intent". π
π₯ SEE ALSO π₯
this program is a part of debhelper. family. π«Ά
π AUTHOR π
Niels Thykier <niels@thykier.net>
and that's the whole page, bestie β this version is from debhelper 14.5ubuntu1, dated 2026-09-21, and honestly? iconic. take care of your debug symbols and they'll take care of you. πβ¨ππ¦
π¦ where this page comes from
- ubuntu stonking: debhelper 14.5ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms