1dwz(1)                      General Commands Manual                     dwz(1)
2
3
4

NAME

6       dwz - DWARF optimization and duplicate removal tool
7

SYNOPSIS

9       dwz [OPTION...] [FILES]
10

DESCRIPTION

12       dwz  is a program that attempts to optimize DWARF debugging information
13       contained in ELF shared libraries and  ELF  executables  for  size,  by
14       replacing DWARF information representation with equivalent smaller rep‐
15       resentation where possible and by reducing the  amount  of  duplication
16       using  techniques from DWARF standard appendix E - creating DW_TAG_par‐
17       tial_unit compilation units (CUs) for duplicated information and  using
18       DW_TAG_imported_unit to import it into each CU that needs it.
19
20       The  tool handles DWARF 32-bit format debugging sections of versions 2,
21       3 and 4 and GNU extensions on top of those, though  using  DWARF  4  or
22       worst case DWARF 3 is strongly recommended.
23
24       The  tool  has  two  main  modes of operation, without the -m option it
25       attempts to optimize DWARF debugging information in each  given  object
26       (executable  or  shared  library)  individually,  with the -m option it
27       afterwards attempts to optimize even more  by  moving  DWARF  debugging
28       information  entries  (DIEs), strings and macro descriptions duplicated
29       in more than one object into a newly created ELF  ET_REL  object  whose
30       filename  is  given  as  -m option argument.  The debug sections in the
31       executables and shared libraries specified on the command line are then
32       modified again, referring to the entities in the newly created object.
33

OPTIONS

35       -m FILE --multifile FILE
36              Multifile  mode.   After  processing  all  named executables and
37              shared libraries, attempt to create  ELF  object  FILE  and  put
38              debugging  information duplicated in more than one object there,
39              afterwards optimize each named executable or shared library even
40              further if possible.
41
42       -h --hardlink
43              Look  for  executables  or shared libraries hardlinked together,
44              instead of rewriting them individually rewrite just one of  them
45              and hardlink the rest to the first one again.
46
47       -M NAME --multifile-name NAME
48              Specify  the name of the common file that should be put into the
49              .gnu_debugaltlink section  alongside  with  its  build  ID.   By
50              default dwz puts there the argument of the -m option.
51
52       -r --relative
53              Specify  that  the  name  of  the common file to be put into the
54              .gnu_debugaltlink section is supposed to be relative  path  from
55              the directory containing the executable or shared library to the
56              file named in the argument of the -m option.  Either  -M  or  -r
57              option can be specified, but not both.
58
59       -q --quiet
60              Silence up some of the most common messages.
61
62       -o FILE --output FILE
63              This  option  instructs dwz not to overwrite the specified file,
64              but instead store the new content into FILE.  Nothing is written
65              if  dwz  exits with non-zero exit code.  Can be used only with a
66              single executable or shared library (if there are  no  arguments
67              at all, a.out is assumed).
68
69       -l COUNT --low-mem-die-limit COUNT
70              Handle  executables  or  shared  libraries  containing more than
71              COUNT debugging information entries in their .debug_info section
72              using  a  slower  and  more memory usage friendly mode and don't
73              attempt to optimize that object in multifile mode.  The  default
74              is 10 million DIEs.  There is a risk that for very large amounts
75              of debugging information in a  single  shared  library  or  exe‐
76              cutable  there  might  not be enough memory (especially when dwz
77              tool is 32-bit binary, it might run  out  of  available  virtual
78              address space even sooner).
79
80       -L COUNT --max-die-limit COUNT
81              Don't  attempt  to optimize executables or shared libraries con‐
82              taining more than COUNT DIEs at all.  The default is 50  million
83              DIEs.
84
85       -? --help
86              Print short help and exit.
87
88       -v --version
89              Print version number and short licensing notice and exit.
90

ARGUMENTS

92       Command-line  arguments  should be the executables, shared libraries or
93       their stripped to file separate debug information objects.
94

EXAMPLES

96              $ dwz -m .dwz/foobar-1.2.debug -rh \
97                bin/foo.debug bin/foo2.debug foo/lib/libbar.so.debug
98       will  attempt  to  optimize  debugging  information  in  bin/foo.debug,
99       bin/foo2.debug  and  lib/libbar.so.debug  (by  modifying  the  files in
100       place) and when beneficial also will create .dwz/foobar-1.2.debug file.
101       .gnu_debugaltlink  section  in  the  first  two  files  will  refer  to
102       ../.dwz/foobar-1.2.debug  and  in  the  last  file  to  ../../.dwz/foo‐
103       bar-1.2.debug.    If   e.g.    bin/foo.debug  and  bin/foo2.debug  were
104       hardlinked together initially, they will be hardlinked  again  and  for
105       multifile  optimizations  considered  just as a single file rather than
106       two.
107              $ dwz -o foo.dwz foo
108       will not modify foo but instead store the  ELF  object  with  optimized
109       debugging information if successful into foo.dwz file it creates.
110              $ dwz *.debug foo/*.debug
111       will   attempt   to  optimize  debugging  information  in  *.debug  and
112       foo/*.debug files, optimizing each file individually in place.
113              $ dwz
114       is equivalent to dwz a.out command.
115

SEE ALSO

117       http://dwarfstd.org/doc/DWARF4.pdf , gdb(1).
118

AUTHORS

120       Jakub Jelinek <jakub@redhat.com>.
121
122
123
124                                 15 June 2012                           dwz(1)
Impressum