stripping: add libnss_*.so* into online_usrlib

Glibc loads these "NSS modules" (see man 5 nss) on startup.  This is
implemented with something like dlopen() so "ldd" won't show them up.
So they should be considered "online" here.

Without this addition, overwriting libnss_files-2.33.so reproducibly
triggers a crash during jhalfs runs where stripping is enabled.  In
manual builds, it reproducibly triggers a crash exiting from chroot.

After this change I reran stripping 5 times and there was no crash
observed.
This commit is contained in:
Xi Ruoyao 2021-07-28 01:18:37 +08:00
parent 5287d521e9
commit d1592b9d92
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC
2 changed files with 12 additions and 1 deletions

View File

@ -43,6 +43,16 @@
appropriate for the entry or if needed the entire day's listitem.
-->
<listitem>
<para>2021-07-27</para>
<itemizedlist>
<listitem>
<para>[xry111] - Use workaround for Glibc NSS modules during
stripping, to prevent bash from crash.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>2021-07-26</para>
<itemizedlist>

View File

@ -62,7 +62,8 @@ online_usrbin="bash find strip"
online_usrlib="libbfd-&binutils-version;.so libdl-&glibc-version;.so
libhistory.so.&readline-version; libncursesw.so.&ncurses-version;
libm-&glibc-version;.so libreadline.so.&readline-version;
libz.so.&zlib-version;"
libz.so.&zlib-version;
$(cd /usr/lib; find libnss*.so* -type f)"
for BIN in $online_usrbin; do
cp /usr/bin/$BIN /tmp/$BIN