From b822811980a5f82726cb641cbeff66be9eb6d92a Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Sun, 22 Jul 2001 19:45:10 +0000 Subject: XML changes git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@827 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/aboutdebug.xml | 63 ++++++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 40 deletions(-) (limited to 'chapter06/aboutdebug.xml') diff --git a/chapter06/aboutdebug.xml b/chapter06/aboutdebug.xml index 094398e2f..b743aa9ab 100644 --- a/chapter06/aboutdebug.xml +++ b/chapter06/aboutdebug.xml @@ -1,70 +1,53 @@ About debugging symbols - -Most programs and libraries by default are compiled with debugging +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. - +are and why you may not want them. - -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 +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 friendly. These debugging symbols also enlarge the program or library -significantly. - +significantly. - -Before you start wondering whether these debugging symbols really make a +Before you start wondering whether these debugging symbols really make a big difference, here are some statistics. Use them to draw your own -conclusion. - +conclusion. - - A dynamic Bash binary with debugging symbols: 1.2MB - +A dynamic Bash binary +with debugging symbols: 1.2MB - - A dynamic Bash binary without debugging symbols: 478KB - +A dynamic Bash binary +without debugging symbols: 478KB - - /lib and /usr/lib (glibc and gcc files) with debugging - symbols: 87MB - +/lib and /usr/lib (glibc +and gcc files) with debugging symbols: 87MB - - /lib and /usr/lib (glibc and gcc files) without - debugging symbols: 16MB - +/lib and /usr/lib (glibc +and gcc files) without debugging symbols: 16MB - -Sizes vary depending on which compiler was used and which C library +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. - +binaries I regained a little over 102 MB of disk space. Quite the +difference. - -To remove debugging symbols from a binary (must be an a.out or ELF +To remove debugging symbols from a binary (must be an a.out or ELF binary) run strip --strip-debug filename. Wild cards can be used to strip debugging symbols from multiple files (use something like strip --strip-debug $LFS/usr/bin/*). Most people will probably never use a debugger on software, so by -removing those symbols a lot of disk space can be regained. - +removing those symbols a lot of disk space can be regained. - -You might find additional information in the optimization hint which can +You might find additional information in the optimization hint which can be found at -http://archive.linuxfromscratch.org/lfs-hints/optimization.txt. - +url="http://archive.linuxfromscratch.org/lfs-hints/optimization.txt">http://archive.linuxfromscratch.org/lfs-hints/optimization.txt +. -- cgit v1.2.3-54-g00ecf