From 81fd230419b0cfd052b08fc1ed352bb7d49975df Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Sat, 19 Feb 2005 22:16:42 +0000 Subject: Trunk is now identical to Testing git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4648 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/strippingagain.xml | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) (limited to 'chapter06/strippingagain.xml') diff --git a/chapter06/strippingagain.xml b/chapter06/strippingagain.xml index e0531df3e..f6c5fa2ec 100644 --- a/chapter06/strippingagain.xml +++ b/chapter06/strippingagain.xml @@ -1,24 +1,54 @@ - + + %general-entities; +]> Stripping Again -Exit from chroot: +If the intended user is not a programmer and does not plan to do +any debugging on the system software, the system size can be decreased +by about 200 MB by removing the debugging symbols from binaries and +libraries. This causes no inconvenience other than not being able to +debug the software fully anymore. + +Most people who use the command mentioned below do not +experience any difficulties. However, it is easy to make a typo and +render the new system unusable, so before running the +strip command, it is a good idea to make a +backup of the current situation. + +Before performing the stripping, take special care to ensure that +none of the binaries that are about to be stripped are running. If +unsure whether the user entered chroot with the command given in + first exit from +chroot: logout -Reenter with: +Then reenter it with: chroot $LFS /tools/bin/env -i \ HOME=/root TERM=$TERM PS1='\u:\w\$ ' \ PATH=/bin:/usr/bin:/sbin:/usr/sbin \ /tools/bin/bash --login -Strip the binaries and libraries: +Now the binaries and libraries can be safely stripped: /tools/bin/find /{,usr/}{bin,lib,sbin} -type f \ -exec /tools/bin/strip --strip-debug '{}' ';' +A large number of files will be reported as having their file +format not recognized. These warnings can be safely ignored. These +warnings indicate that those files are scripts instead of +binaries. + +If disk space is very tight, the +--strip-all option can be used on the binaries +in /{,usr/}{bin,sbin} to gain +several more megabytes. Do not use this option on libraries—they will +be destroyed. + -- cgit v1.2.3-54-g00ecf