From b08f4096533577934b885fa9df41d3881d141612 Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Thu, 15 Feb 2001 15:26:52 +0000 Subject: Initial XML commit git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@174 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/aboutdebug.sgml | 69 ----------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 chapter06/aboutdebug.sgml (limited to 'chapter06/aboutdebug.sgml') diff --git a/chapter06/aboutdebug.sgml b/chapter06/aboutdebug.sgml deleted file mode 100644 index 5bd7a671e..000000000 --- a/chapter06/aboutdebug.sgml +++ /dev/null @@ -1,69 +0,0 @@ - -About debugging symbols - - -Most programs and libraries by default are compiled with debugging -symbols and optimizing level 2 (gcc options -g and -O2) and are compiled -for a specific CPU. On Intel platforms software is compiled for i386 -processors by default. If you don't wish to run software on other -machines other than your own, you might want to change the default -compiler options so that they will be compiled with a higher -optimization level, no debugging symbols and generate code for your -specific architecture. Let me first explain what debugging symbols -are. - - - -A program compiled with debugging symbols means you can run a program or -library through a debugger and the debugger's output will be user friendlier. -These debugging symbols also enlarge the program or library significantly. - - - -To remove debugging symbols from a binary (must be an a.out or ELF binary) -run strip --strip-debug filename You can use wild cards -if you need to strip debugging symbols from multiple files (use something like -strip --strip-debug $LFS/usr/bin/*). Another, easier, options is just -not to compile programs with debugging symbols. Most people will probably -never use a debugger on software, so by leaving those symbols out you -can save a lot of diskspace. - - - -Before you wonder if these debugging symbols would make a big difference, -here are some statistics: - - - - - - A dynamic Bash binary with debugging symbols: 1.2MB - - - - 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) without - debugging symbols: 16MB - - - - - -Sizes may vary depending on which compiler was used and which C library -version was used to link dynamic programs against, but your 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 and libraries I regained a little over 102 MB of disk space. Quite -the difference. - - - - -- cgit v1.2.3-54-g00ecf