mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
stripping: Compress the kept debug info with Zlib
This commit is contained in:
parent
48d8f5a51d
commit
80da60f0c0
@ -29,9 +29,12 @@
|
|||||||
needed by the linker (for static libraries) or dynamic linker (for
|
needed by the linker (for static libraries) or dynamic linker (for
|
||||||
dynamically linked binaries and shared libraries).</para>
|
dynamically linked binaries and shared libraries).</para>
|
||||||
|
|
||||||
<para>The debugging symbols from selected libraries are preserved
|
<!-- TODO: Zstd is better than Zlib for both speed and size.
|
||||||
in separate files. That debugging information is needed to run
|
Unfortunately Valgrind does not support Zstd-compressed debug
|
||||||
regression tests with <ulink
|
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/valgrind.html'>valgrind</ulink> or <ulink
|
||||||
url='&blfs-book;/general/gdb.html'>gdb</ulink> later, in BLFS.
|
url='&blfs-book;/general/gdb.html'>gdb</ulink> later, in BLFS.
|
||||||
</para>
|
</para>
|
||||||
@ -78,7 +81,7 @@
|
|||||||
cd /usr/lib
|
cd /usr/lib
|
||||||
|
|
||||||
for LIB in $save_usrlib; do
|
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
|
cp $LIB /tmp/$LIB
|
||||||
strip --strip-unneeded /tmp/$LIB
|
strip --strip-unneeded /tmp/$LIB
|
||||||
objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB
|
objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB
|
||||||
|
Loading…
Reference in New Issue
Block a user