From 80da60f0c070dee52f7add18aea74c0e124ed8f7 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 13 Sep 2023 15:39:25 +0800 Subject: stripping: Compress the kept debug info with Zlib --- chapter08/stripping.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/chapter08/stripping.xml b/chapter08/stripping.xml index 68e0f8da1..b7b983d73 100644 --- a/chapter08/stripping.xml +++ b/chapter08/stripping.xml @@ -29,9 +29,12 @@ needed by the linker (for static libraries) or dynamic linker (for dynamically linked binaries and shared libraries). - The debugging symbols from selected libraries are preserved - in separate files. That debugging information is needed to run - regression tests with + The debugging symbols from selected libraries are compressed with + Zlib and preserved in separate files. That + debugging information is needed to run regression tests with valgrind or gdb later, in BLFS. @@ -78,7 +81,7 @@ cd /usr/lib for LIB in $save_usrlib; do - objcopy --only-keep-debug $LIB $LIB.dbg + objcopy --only-keep-debug --compress-debug-sections=zlib $LIB $LIB.dbg cp $LIB /tmp/$LIB strip --strip-unneeded /tmp/$LIB objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB -- cgit v1.2.3-54-g00ecf