|
NAMEdwz - DWARF optimization and duplicate removal toolSYNOPSISdwz [OPTION...] [FILES]DESCRIPTIONdwz is a program that attempts to optimize DWARF debugging information contained in ELF shared libraries and ELF executables for size, by replacing DWARF information representation with equivalent smaller representation where possible and by reducing the amount of duplication using techniques from DWARF standard appendix E - creating DW_TAG_partial_unit compilation units (CUs) for duplicated information and using DW_TAG_imported_unit to import it into each CU that needs it.The tool handles DWARF 32-bit format debugging sections of versions 2, 3, 4, most of version 5 and GNU extensions on top of those. It is strongly recommended to use at least DWARF 3, but using DWARF 4 or higher will work much better. While most of DWARF 5 is supported dwz doesn't yet generate spec compliant DWARF Supplementary Object Files (DWARF 5, section 7.3.6) unless the --dwarf-5 option is used. Instead of a .debug_sup section it will generate by default a .gnu_debugaltlink section. And it will use the DW_FORM_GNU_strp_alt and DW_FORM_GNU_reg_alt, instead of DW_FORM_strp_sup and DW_FORM_ref_sup to keep compatibility with existing DWARF consumers. DWARF 4 .debug_types are supported, but DWARF 5 DW_UT_type units are not. Likewise .gdb_index is supported, but the DWARF 5 .debug_names is not. Also some forms and sections that are only emitted by GCC when generating Split DWARF, DW_FORM_strx and .debug_str_offsets, DW_FORM_addrx and .debug_addr, DW_FORM_rnglistx and DW_FORM_loclistsx, are not supported yet. The tool has two main modes of operation, without the -m option it attempts to optimize DWARF debugging information in each given object (executable or shared library) individually, with the -m option it afterwards attempts to optimize even more by moving DWARF debugging information entries (DIEs), strings and macro descriptions duplicated in more than one object into a newly created ELF ET_REL object whose filename is given as -m option argument. The debug sections in the executables and shared libraries specified on the command line are then modified again, referring to the entities in the newly created object. OPTIONS
ARGUMENTSCommand-line arguments should be the executables, shared libraries or their stripped to file separate debug information objects.EXAMPLES$ dwz -m .dwz/foobar-1.2.debug -rh \
bin/foo.debug bin/foo2.debug foo/lib/libbar.so.debug
will attempt to optimize debugging information in bin/foo.debug,
bin/foo2.debug and lib/libbar.so.debug (by modifying the files
in place) and when beneficial also will create .dwz/foobar-1.2.debug
file. .gnu_debugaltlink section in the first two files will refer to
../.dwz/foobar-1.2.debug and in the last file to
../../.dwz/foobar-1.2.debug. If e.g. bin/foo.debug and
bin/foo2.debug were hardlinked together initially, they will be
hardlinked again and for multifile optimizations considered just as a single
file rather than two.
$ dwz -o foo.dwz foo
will not modify foo but instead store the ELF object with optimized
debugging information if successful into foo.dwz file it creates.
$ dwz *.debug foo/*.debug
will attempt to optimize debugging information in *.debug and foo/*.debug files,
optimizing each file individually in place.
$ dwz
is equivalent to dwz a.out command.
SEE ALSOhttp://dwarfstd.org/doc/DWARF4.pdf , http://dwarfstd.org/doc/DWARF5.pdf , gdb(1).AUTHORSJakub Jelinek <jakub@redhat.com>, Tom de Vries <tdevries@suse.de>, Mark Wielaard <mark@klomp.org>BUGSUse the Bugzilla link of the project web page or our mailing list. https://sourceware.org/dwz/, <dwz@sourceware.org>.
Visit the GSP FreeBSD Man Page Interface. |