Changes in chapter08/stripping.xml [8b9efe67:9c753b58]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter08/stripping.xml
r8b9efe67 r9c753b58 13 13 <para>This section is optional. If the intended user is not a 14 14 programmer and does not plan to do 15 any debugging o n the system software, the systemsize can be decreased16 by about 2 GB by removing the debugging symbols and unneededsymbol table17 entries from binaries and libraries. This causes no inconvenience other18 than not being able to debug the software fully anymore.</para>15 any debugging of the system software, the system's size can be decreased 16 by some 2 GB by removing the debugging symbols, and some unnecessary symbol table 17 entries, from binaries and libraries. This causes no real inconvenience for 18 a typical Linux user.</para> 19 19 20 20 <para>Most people who use the commands mentioned below do not 21 experience any difficulties. However, it is easy to make a typoand22 render the new system unusable , so before running the21 experience any difficulties. However, it is easy to make a mistake and 22 render the new system unusable. So before running the 23 23 <command>strip</command> commands, it is a good idea to make a 24 24 backup of the LFS system in its current state.</para> 25 25 26 <para>A <command>strip</command> command with 26 <para>A <command>strip</command> command with the 27 27 <parameter>--strip-unneeded</parameter> option removes all debug symbols 28 from a binary or library. And, itremoves all symbol table entries not28 from a binary or library. It also removes all symbol table entries not 29 29 needed by the linker (for static libraries) or dynamic linker (for 30 dynamic -linked binaries and shared libraries).</para>30 dynamically linked binaries and shared libraries).</para> 31 31 32 <para>The debugging symbols f or selected libraries are placed33 in separate files. Th is debugging information is needed if running34 regression tests that use<ulink32 <para>The debugging symbols from selected libraries are preserved 33 in separate files. That debugging information is needed to run 34 regression tests with <ulink 35 35 url='&blfs-book;/general/valgrind.html'>valgrind</ulink> or <ulink 36 url='&blfs-book;/general/gdb.html'>gdb</ulink> later in BLFS.36 url='&blfs-book;/general/gdb.html'>gdb</ulink> later, in BLFS. 37 37 </para> 38 38 39 39 <para>Note that <command>strip</command> will overwrite the binary or library 40 40 file it is processing. This can crash the processes using code or data from 41 the file. If the process running <command>strip</command> i tself is42 affected, the binary or library being stripped can be destroyed andcan43 make the system completely unusable. To avoid it, we'llcopy some libraries41 the file. If the process running <command>strip</command> is 42 affected, the binary or library being stripped can be destroyed; this can 43 make the system completely unusable. To avoid this problem we copy some libraries 44 44 and binaries into <filename class="directory">/tmp</filename>, strip them 45 there, and install them backwith the <command>install</command> command.46 Read the related entry in <xref linkend="pkgmgmt-upgrade-issues"/> forthe47 rationale to use the <command>install</command> command here.</para>45 there, then reinstall them with the <command>install</command> command. 46 (The related entry in <xref linkend="pkgmgmt-upgrade-issues"/> gives the 47 rationale for using the <command>install</command> command here.)</para> 48 48 49 <note><para>The ELF loader's name is ld-linux-aarch64.so.1 on 50 little-endian systems and ld-linux-aarch64_be.so.1 on big-endian systems. 51 The construct below selects the 49 <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems 50 and ld-linux.so.2 on 32-bit systems. The construct below selects the 52 51 correct name for the current architecture, excluding anything ending 53 52 with <quote>g</quote>, in case the commands below have already been … … 113 112 </userinput></screen> 114 113 115 <para>A large number of files will be reported as havingtheir file116 format not recognized. These warnings can be safely ignored. They117 indicate that those files are scripts instead ofbinaries.</para>114 <para>A large number of files will be flagged as errors because their file 115 format is not recognized. These warnings can be safely ignored. They 116 indicate that those files are scripts, not binaries.</para> 118 117 119 118 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.