|
@@ -2,8 +2,7 @@
|
|
|
<title>About debugging symbols</title>
|
|
|
|
|
|
<para>Most programs and libraries by default are compiled with debugging
|
|
|
-symbols (gcc option -g) Let me explain what these debugging symbols
|
|
|
-are and why you may not want them.</para>
|
|
|
+symbols (gcc option -g).</para>
|
|
|
|
|
|
<para>A program compiled with debugging symbols means a user can run a program
|
|
|
or library through a debugger and the debugger's output will be user
|
|
@@ -32,10 +31,7 @@ and gcc files) without debugging symbols: 16MB</para></listitem>
|
|
|
|
|
|
<para>Sizes vary depending on which compiler was used and which C library
|
|
|
version was used to link dynamic programs against, but results will be
|
|
|
-similar if you compare programs with and without debugging symbols. After
|
|
|
-I was done with this chapter and stripped all debugging symbols from all LFS
|
|
|
-binaries I regained a little over 102 MB of disk space. Quite the
|
|
|
-difference.</para>
|
|
|
+similar if you compare programs with and without debugging symbols.</para>
|
|
|
|
|
|
<para>To remove debugging symbols from a binary (must be an a.out or ELF
|
|
|
binary) run <userinput>strip --strip-debug filename</userinput>. Wild cards
|
|
@@ -44,6 +40,10 @@ like <userinput>strip --strip-debug $LFS/usr/bin/*</userinput>).
|
|
|
Most people will probably never use a debugger on software, so by
|
|
|
removing those symbols a lot of disk space can be regained.</para>
|
|
|
|
|
|
+<para>For your convenience, chapter 9 includes one simple command to strip
|
|
|
+all debugging symbols from all programs and libraries on your
|
|
|
+system.</para>
|
|
|
+
|
|
|
<para>You might find additional information in the optimization hint which can
|
|
|
be found at <ulink
|
|
|
url="&hint-root;optimization.txt">&hint-root;optimization.txt</ulink>
|