File: dwz.1

package info (click to toggle)
dwz 0.11-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 532 kB
  • ctags: 748
  • sloc: ansic: 11,471; makefile: 22
file content (134 lines) | stat: -rw-r--r-- 5,207 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
.TH dwz 1 "15 June 2012"
.SH NAME
dwz \- DWARF optimization and duplicate removal tool
.SH SYNOPSIS
dwz
.RB [OPTION...]\ [FILES]
.SH DESCRIPTION
\fBdwz\fR 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
\fIDW_TAG_partial_unit\fR
compilation units (CUs) for duplicated information and using
\fIDW_TAG_imported_unit\fR
to import it into each CU that needs it.

The tool handles DWARF 32-bit format debugging sections of versions
2, 3 and 4 and GNU extensions on top of those, though using DWARF 4
or worst case DWARF 3 is strongly recommended.

The tool has two main modes of operation, without the
\fI-m\fR option it attempts to optimize DWARF debugging information in each
given object (executable or shared library) individually, with the
\fI-m\fR 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
\fI-m\fR
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.
.SH OPTIONS
.TP
.B \-m\ FILE \-\-multifile FILE
Multifile mode.
After processing all named executables and shared libraries, attempt to
create ELF object
\fIFILE\fR
and put debugging information duplicated in more than one object there,
afterwards optimize each named executable or shared library even further
if possible.
.TP
.B \-h\ \-\-hardlink
Look for executables or shared libraries hardlinked together, instead
of rewriting them individually rewrite just one of them and hardlink the
rest to the first one again.
.TP
.B \-M NAME \-\-multifile-name NAME
Specify the name of the common file that should be put into the
\fI.gnu_debugaltlink\fR section alongside with its build ID.  By default
\fBdwz\fR puts there the argument of the \fB-m\fR option.
.TP
.B \-r \-\-relative
Specify that the name of the common file to be put into the
\fI.gnu_debugaltlink\fR
section is supposed to be relative path from the directory containing
the executable or shared library to the file named in the argument
of the \fB-m\fR option.  Either \fB-M\fR or \fB-r\fR
option can be specified, but not both.
.TP
.B \-q \-\-quiet
Silence up some of the most common messages.
.TP
.B \-o FILE \-\-output FILE
This option instructs
\fBdwz\fR not to overwrite the specified file, but instead store the new content
into \fBFILE\fR.  Nothing is written if \fBdwz\fR
exits with non-zero exit code.  Can be used only with a single executable
or shared library (if there are no arguments at all,
\fIa.out\fR
is assumed).
.TP
.B \-l COUNT \-\-low\-mem\-die\-limit COUNT
Handle executables or shared libraries containing more than
\fICOUNT\fR debugging information entries in their \fI.debug_info\fR
section using a slower and more memory usage friendly mode and don't
attempt to optimize that object in multifile mode.
The default is 10 million DIEs.  There is a risk that for very large
amounts of debugging information in a single shared library or executable
there might not be enough memory (especially when \fBdwz\fR
tool is 32-bit binary, it might run out of available virtual address
space even sooner).
.TP
.B \-L COUNT \-\-max\-die\-limit COUNT
Don't attempt to optimize executables or shared libraries
containing more than
\fICOUNT\fR DIEs at all.  The default is 50 million DIEs.
.TP
.B \-? \-\-help
Print short help and exit.
.TP
.B \-v \-\-version
Print version number and short licensing notice and exit.
.SH ARGUMENTS
Command-line arguments should be the executables, shared libraries
or their stripped to file separate debug information objects.
.SH EXAMPLES
.RS
$ dwz -m .dwz/foobar-1.2.debug -rh \\
  bin/foo.debug bin/foo2.debug foo/lib/libbar.so.debug
.RE
will attempt to optimize debugging information in
\fIbin/foo.debug\fR, \fIbin/foo2.debug\fR and
\fIlib/libbar.so.debug\fR (by modifying the files in place) and
when beneficial also will create \fI.dwz/foobar-1.2.debug\fR file.
\fI.gnu_debugaltlink\fR section in the first two files will refer to
\fI../.dwz/foobar-1.2.debug\fR and in the last file to
\fI../../.dwz/foobar-1.2.debug\fR.  If e.g.
\fIbin/foo.debug\fR and \fIbin/foo2.debug\fR were hardlinked
together initially, they will be hardlinked again and for multifile
optimizations considered just as a single file rather than two.
.RS
$ dwz -o foo.dwz foo
.RE
will not modify \fIfoo\fR
but instead store the ELF object with optimized debugging information
if successful into \fIfoo.dwz\fR
file it creates.
.RS
$ dwz *.debug foo/*.debug
.RE
will attempt to optimize debugging information in *.debug and foo/*.debug
files, optimizing each file individually in place.
.RS
$ dwz
.RE
is equivalent to \fIdwz a.out\fR command.
.SH SEE ALSO
.BR http://dwarfstd.org/doc/DWARF4.pdf
,
.BR gdb (1).
.SH AUTHORS
Jakub Jelinek <jakub@redhat.com>.