From 942e81de788ae13a07afe6e6abbbb4fd6a1719ac Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 21 Aug 2022 20:27:28 +0800 Subject: stripping: also mention symbol table bisides debug symbols --- chapter08/stripping.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'chapter08') diff --git a/chapter08/stripping.xml b/chapter08/stripping.xml index 519119088..d82b72ac1 100644 --- a/chapter08/stripping.xml +++ b/chapter08/stripping.xml @@ -13,9 +13,9 @@ This section is optional. 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 2 GB by removing the debugging symbols from binaries and - libraries. This causes no inconvenience other than not being able to - debug the software fully anymore. + by about 2 GB by removing the debugging symbols and unneeded symbol table + entries from binaries and libraries. This causes no inconvenience other + than not being able to debug the software fully anymore. Most people who use the commands mentioned below do not experience any difficulties. However, it is easy to make a typo and @@ -23,6 +23,12 @@ strip commands, it is a good idea to make a backup of the LFS system in its current state. + A strip command with + --strip-unneeded option removes all debug symbols + from a binary or library. And, it removes all symbol table entries not + needed by the linker (for static libraries) or dynamic linker (for + dynamic-linked binaries and shared libraries). + The debugging symbols for selected libraries are placed in separate files. This debugging information is needed if running regression tests that use