About debugging symbols

Most programs and libraries are, by default, compiled with debugging symbols included (with gcc's -g option). This means that, when debugging a program or library that was compiled with debugging information included, the debugger can give you not only memory addresses but also the names of the routines and variables.

The inclusion of these debugging symbols, however, enlarges a program or library significantly. To get an idea of the amount of space these symbols occupy, have a look at the following:

Sizes may vary somewhat, depending on which compiler was used and which C library, but when comparing programs with and without debugging symbols the difference will generally be a factor between 2 and 5.

As most people will probably never use a debugger on their system software, a lot of disk space can be regained by removing these symbols. For your convenience, the next section shows how to strip all debugging symbols from all programs and libraries. Information on other ways of optimizing your system can be found in the hint at http://www.linuxfromscratch.org/hints/downloads/files/optimization.txt.