diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2020-06-16 11:56:28 +0000 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2020-06-16 11:56:28 +0000 |
commit | 675606bde2ba53946537b42a5aa576692a311621 (patch) | |
tree | af20c20ce3841c16b24d0b9903af6878a4a0f5a6 /chapter08/aboutdebug.xml | |
parent | 560065f976e371779928dbf8b9428217f3f57331 (diff) | |
parent | 1cd59612d00603c9ce773ad821a15d20bc4fa0b7 (diff) |
Split Chapter 5 into three separate chapters.
Implement a new method of cross-building the LFS tool chain
and other tools to simplify the method of isolating the
new system from the original host. This will be the start of
LFS-10.0.
Move old trunk/BOOK to branches/old-trunk.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11946 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter08/aboutdebug.xml')
-rw-r--r-- | chapter08/aboutdebug.xml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/chapter08/aboutdebug.xml b/chapter08/aboutdebug.xml new file mode 100644 index 000000000..d646b797e --- /dev/null +++ b/chapter08/aboutdebug.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-aboutdebug"> + <?dbhtml filename="aboutdebug.html"?> + + <title>About Debugging Symbols</title> + + <para>Most programs and libraries are, by default, compiled with + debugging symbols included (with <command>gcc</command>'s + <parameter>-g</parameter> option). This means that when debugging a + program or library that was compiled with debugging information, + the debugger can provide not only memory addresses, but also + the names of the routines and variables.</para> + + <para>However, the inclusion of these debugging symbols enlarges a + program or library significantly. The following is an example of the + amount of space these symbols occupy:</para> + + <itemizedlist> + <listitem> + <para>A <command>bash</command> binary with debugging symbols: + 1200 KB</para> + </listitem> + <listitem> + <para>A <command>bash</command> binary without 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 files without debugging symbols: 16 MB</para> + </listitem> + </itemizedlist> + + <para>Sizes may vary depending on which compiler and C library were used, + but when comparing programs with and without debugging symbols, the + difference will usually be a factor between two and five.</para> + + <para>Because most users will never use a debugger on their system software, + a lot of disk space can be regained by removing these symbols. The next + section shows how to strip all debugging symbols from the programs and + libraries.</para> + +</sect1> |