1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
4 | %general-entities;
|
---|
5 | ]>
|
---|
6 | <sect1 id="ch-system-aboutdebug">
|
---|
7 | <title>About debugging symbols</title>
|
---|
8 | <?dbhtml filename="aboutdebug.html"?>
|
---|
9 |
|
---|
10 | <para>Most programs and libraries are, by default, compiled with debugging
|
---|
11 | symbols included (with <command>gcc</command>'s <emphasis>-g</emphasis>
|
---|
12 | option). This means that, when debugging a program or library that was compiled
|
---|
13 | with debugging information included, the debugger can give you not only memory
|
---|
14 | addresses but also the names of the routines and variables.</para>
|
---|
15 |
|
---|
16 | <para>The inclusion of these debugging symbols, however, enlarges a program or
|
---|
17 | library significantly. To get an idea of the amount of space these symbols
|
---|
18 | occupy, have a look at the following:</para>
|
---|
19 |
|
---|
20 | <itemizedlist>
|
---|
21 |
|
---|
22 | <listitem><para>a bash binary
|
---|
23 | with debugging symbols: 1200 KB</para></listitem>
|
---|
24 |
|
---|
25 | <listitem><para>a bash binary
|
---|
26 | without debugging symbols: 480 KB</para></listitem>
|
---|
27 |
|
---|
28 | <listitem><para>Glibc and GCC files (/lib and /usr/lib)
|
---|
29 | with debugging symbols: 87 MB</para></listitem>
|
---|
30 |
|
---|
31 | <listitem><para>Glibc and GCC files
|
---|
32 | without debugging symbols: 16 MB</para></listitem>
|
---|
33 |
|
---|
34 | </itemizedlist>
|
---|
35 |
|
---|
36 | <para>Sizes may vary somewhat, depending on which compiler was used and which C
|
---|
37 | library, but when comparing programs with and without debugging symbols the
|
---|
38 | difference will generally be a factor between 2 and 5.</para>
|
---|
39 |
|
---|
40 | <para>As most people will probably never use a debugger on their system
|
---|
41 | software, a lot of disk space can be regained by removing these symbols. For
|
---|
42 | your convenience, the next section shows how to strip all debugging symbols
|
---|
43 | from all programs and libraries. Information on other ways of optimizing your
|
---|
44 | system can be found in the hint at <ulink url="&hints-root;optimization.txt"/>.</para>
|
---|
45 |
|
---|
46 | </sect1>
|
---|