Changeset ef13657 for chapter06/strippingagain.xml
- Timestamp:
- 08/08/2004 02:11:09 AM (20 years ago)
- Branches:
- 6.0
- Children:
- 5ba3d1d
- Parents:
- 6e41459
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/strippingagain.xml
r6e41459 ref13657 5 5 <?dbhtml filename="strippingagain.html"?> 6 6 7 <para>If you are not a programmer and don't plan to do any debugging on your 8 system software, you can shrink your system by about 200 MB by removing the 9 debugging symbols from binaries and libraries. This causes no inconvenience 10 other than not being able to debug the software fully any more.</para> 7 <para>If the intended user is not a programmer and does not plan to do 8 any debugging on the system software, the system size can be decreased 9 by about 200 MB by removing the debugging symbols from binaries and 10 libraries. This causes no inconvenience other than not being able to 11 debug the software fully anymore.</para> 11 12 12 <para>Most people who use the command mentioned below don't experience any 13 problems. But it is easy to make a typo and render your new system unusable, so 14 before running the strip command it is probably a good idea to make a backup of 15 the current situation.</para> 13 <para>Most people who use the command mentioned below do not 14 experience any difficulties. However, it is easy to make a typo and 15 render the new system unusable, so before running the strip command, 16 it is probably a good idea to make a backup of the current 17 situation.</para> 16 18 17 <para>If you are going to perform the stripping, special care is needed to 18 ensure you're not running any of the binaries that are about to be stripped. 19 If you're not sure whether you entered chroot with the command given in 20 <xref linkend="ch-system-chroot"/>, then first exit from chroot:</para> 19 <para>Before perform the stripping, take special care to ensure that 20 none of the binaries that are about to be stripped are running. If 21 unsure whether the user entered chroot with the command given in 22 <xref linkend="ch-system-chroot"/>, first exit from 23 chroot:</para> 21 24 22 25 <screen><userinput>logout</userinput></screen> … … 29 32 /tools/bin/bash --login</userinput></screen> 30 33 31 <para>Now you can safely strip the binaries and libraries:</para>34 <para>Now the binaries and libraries can be safely stripped:</para> 32 35 33 36 <screen><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \ 34 37 -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen> 35 38 36 <para>A large number of files will be reported as having their file format not 37 recognized. These warnings can be safely ignored, they just mean that those 38 files are scripts instead of binaries, no harm is done.</para> 39 <para>A large number of files will be reported as having their file 40 format not recognized. These warnings can be safely ignored. These 41 warnings indicate that those files are scripts instead of 42 binaries.</para> 39 43 40 <para>If you are really tight on disk space, you may want to use41 <parameter>--strip-all</parameter> o n the binaries in42 <filename class="directory">/{,usr/}{bin,sbin}</filename> to gain several more megabytes. But do 43 <emphasis>not</emphasis> use this option on libraries: they would be 44 destroyed.</para>44 <para>If disk space is very tight, the 45 <parameter>--strip-all</parameter> options can be used on the binaries 46 in <filename class="directory">/{,usr/}{bin,sbin}</filename> to gain 47 several more megabytes. Do not use this option on libraries -- they will 48 be destroyed.</para> 45 49 46 50 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.