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