[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[81fd230] | 7 |
|
---|
[50e693d] | 8 | <sect1 id="ch-system-aboutdebug">
|
---|
| 9 | <?dbhtml filename="aboutdebug.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>About Debugging Symbols</title>
|
---|
| 12 |
|
---|
| 13 | <para>Most programs and libraries are, by default, compiled with
|
---|
| 14 | debugging symbols included (with <command>gcc</command>'s
|
---|
| 15 | <parameter>-g</parameter> option). This means that when debugging a
|
---|
[6a156bab] | 16 | program or library that was compiled with debugging information,
|
---|
| 17 | the debugger can provide not only memory addresses, but also
|
---|
[50e693d] | 18 | the names of the routines and variables.</para>
|
---|
| 19 |
|
---|
| 20 | <para>However, the inclusion of these debugging symbols enlarges a
|
---|
| 21 | program or library significantly. The following is an example of the
|
---|
| 22 | amount of space these symbols occupy:</para>
|
---|
| 23 |
|
---|
| 24 | <itemizedlist>
|
---|
| 25 | <listitem>
|
---|
| 26 | <para>A <command>bash</command> binary with debugging symbols:
|
---|
| 27 | 1200 KB</para>
|
---|
| 28 | </listitem>
|
---|
| 29 | <listitem>
|
---|
| 30 | <para>A <command>bash</command> binary without debugging symbols:
|
---|
| 31 | 480 KB</para>
|
---|
| 32 | </listitem>
|
---|
| 33 | <listitem>
|
---|
| 34 | <para>Glibc and GCC files (<filename class="directory">/lib</filename>
|
---|
| 35 | and <filename class="directory">/usr/lib</filename>) with debugging
|
---|
| 36 | symbols: 87 MB</para>
|
---|
| 37 | </listitem>
|
---|
| 38 | <listitem>
|
---|
| 39 | <para>Glibc and GCC files without debugging symbols: 16 MB</para>
|
---|
| 40 | </listitem>
|
---|
| 41 | </itemizedlist>
|
---|
| 42 |
|
---|
| 43 | <para>Sizes may vary depending on which compiler and C library were used,
|
---|
| 44 | but when comparing programs with and without debugging symbols, the
|
---|
| 45 | difference will usually be a factor between two and five.</para>
|
---|
| 46 |
|
---|
| 47 | <para>Because most users will never use a debugger on their system software,
|
---|
| 48 | a lot of disk space can be regained by removing these symbols. The next
|
---|
| 49 | section shows how to strip all debugging symbols from the programs and
|
---|
[e86763a] | 50 | libraries.</para>
|
---|
[673b0d8] | 51 |
|
---|
| 52 | </sect1>
|
---|