Search

Chapter 6. dwz

download PDF

dwz is a command line tool that attempts to optimize DWARF debugging information contained in ELF shared libraries and ELF executables for size. To do so, dwz replaces DWARF information representation with equivalent smaller representation where possible and reduces the amount of duplication by using techniques from Appendix E of the DWARF Standard.

Red Hat Developer Toolset is distributed with dwz 0.14.

6.1. Installing dwz

In Red Hat Developer Toolset, the dwz utility is provided by the devtoolset-12-dwz package and is automatically installed with devtoolset-12-toolchain as described in Section 1.5, “Installing Red Hat Developer Toolset”.

6.2. Using dwz

To optimize DWARF debugging information in a binary file, run the dwz tool as follows:

$ scl enable devtoolset-12 'dwz option... file_name'

Note that you can execute any command using the scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset dwz as default:

$ scl enable devtoolset-12 'bash'
Note

To verify the version of dwz you are using at any point:

$ which dwz

Red Hat Developer Toolset’s dwz executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset dwz:

$ dwz -v

6.3. Additional Resources

For more information about dwz and its features, see the resources listed below.

Installed Documentation

  • dwz(1) — The manual page for the dwz utility provides detailed information on its usage. To display the manual page for the version included in Red Hat Developer Toolset:

    $ scl enable devtoolset-12 'man dwz'

See Also

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.