| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 | <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [  <!ENTITY % general-entities SYSTEM "../general.ent">  %general-entities;]><sect1 id="ch-system-aboutdebug"><title>About Debugging Symbols</title><?dbhtml filename="aboutdebug.html"?><para>Most programs and libraries are, by default, compiled withdebugging symbols included (with <command>gcc</command>'s<parameter>-g</parameter> option). This means that when debugging aprogram or library that was compiled with debugging informationincluded, the debugger can provide not only memory addresses, but alsothe names of the routines and variables.</para><para>However, the inclusion of these debugging symbols enlarges aprogram or library significantly. The following is an example of theamount of space these symbols occupy:</para> <itemizedlist><listitem><para>a bash binary with debugging symbols: 1200 KB</para></listitem><listitem><para>a bash binarywithout debugging symbols: 480 KB</para></listitem><listitem><para>Glibc and GCC files (<filename class="directory">/lib</filename>and <filename class="directory">/usr/lib</filename>)with debugging symbols: 87 MB</para></listitem><listitem><para>Glibc and GCC fileswithout debugging symbols: 16 MB</para></listitem></itemizedlist><para>Sizes may vary depending on which compiler and Clibrary were used, but when comparing programs with and without debuggingsymbols, the difference will usually be a factor between two andfive.</para><para>Because most users will never use a debugger on their systemsoftware, a lot of disk space can be regained by removing thesesymbols. The next section shows how to strip all debugging symbolsfrom the programs and libraries. Additional information on systemoptimization can be found at <ulink url="&hints-root;optimization.txt"/>.</para></sect1>
 |