aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08/stripping.xml
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-12-05 13:12:55 +0800
committerXi Ruoyao <xry111@xry111.site>2023-12-05 13:12:55 +0800
commit73d91ac621a4e59f71ff6664c68c935317f9ce42 (patch)
tree4f9b341370b83d97379a1343a69d13d48cb65740 /chapter08/stripping.xml
parent6b6a1b958af3a0e59559e44ad700f761d8a49a09 (diff)
parentdc8572f2413a4d25444bb1237ea2a01dfba60429 (diff)
Merge remote-tracking branch 'origin/trunk' into xry111/arm64
Diffstat (limited to 'chapter08/stripping.xml')
-rw-r--r--chapter08/stripping.xml11
1 files changed, 7 insertions, 4 deletions
diff --git a/chapter08/stripping.xml b/chapter08/stripping.xml
index 92ecfe310..83f7545fd 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).</para>
- <para>The debugging symbols from selected libraries are preserved
- in separate files. That debugging information is needed to run
- regression tests with <ulink
+ <!-- TODO: Zstd is better than Zlib for both speed and size.
+ Unfortunately Valgrind does not support Zstd-compressed debug
+ info yet: https://bugs.kde.org/show_bug.cgi?id=469782 -->
+ <para>The debugging symbols from selected libraries are compressed with
+ <application>Zlib</application> and preserved in separate files. That
+ debugging information is needed to run regression tests with <ulink
url='&blfs-book;/general/valgrind.html'>valgrind</ulink> or <ulink
url='&blfs-book;/general/gdb.html'>gdb</ulink> later, in BLFS.
</para>
@@ -79,7 +82,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