Binutils 2.36 strip
by TheRealGrogan from LinuxQuestions.org on (#5DNPN)
Has anybody noticed a change in behaviour of the strip program in binutils 2.36?
I've been using strip with wildcards for decades, but now it seems to dereference symbolic links.
I noticed it while upgrading glibc yesterday. Because that's so important, I visually verify that everything looks OK in install_root before I boot off system to manually replace.
cd /storage2/test/lib
strip -p --strip-unneeded *.so*
This now results in soname symlinks being replaced with copies of the libraries instead of ignoring them. For example:
-rwxr-xr-x 1 root root 1802576 Feb 1 18:48 libc-2.33.so
-rwxr-xr-x 1 root root 43280 Feb 1 18:48 libcrypt-2.33.so
-rwxr-xr-x 1 root root 43280 Feb 1 18:48 libcrypt.so.1
-rwxr-xr-x 1 root root 1802576 Feb 1 18:48 libc.so.6
-rwxr-xr-x 1 root root 14544 Feb 1 18:48 libdl-2.33.so
-rwxr-xr-x 1 root root 14544 Feb 1 18:48 libdl.so.2
-rwxr-xr-x 1 root root 1309008 Feb 1 18:48 libm-2.33.so
-rwxr-xr-x 1 root root 18704 Feb 1 18:48 libmemusage.so
-rwxr-xr-x 1 root root 1309008 Feb 1 18:48 libm.so.6
I think that's a pretty bad change in behaviour, but now that I know, I can just stop using wildcards. I'm not sure if that's a bug or design. Something like this instead:
Code:find /storage2/test | xargs file | grep -e "executable" -e "shared object" | cut -f 1 -d : | xargs strip -p --strip-unneeded


I've been using strip with wildcards for decades, but now it seems to dereference symbolic links.
I noticed it while upgrading glibc yesterday. Because that's so important, I visually verify that everything looks OK in install_root before I boot off system to manually replace.
cd /storage2/test/lib
strip -p --strip-unneeded *.so*
This now results in soname symlinks being replaced with copies of the libraries instead of ignoring them. For example:
-rwxr-xr-x 1 root root 1802576 Feb 1 18:48 libc-2.33.so
-rwxr-xr-x 1 root root 43280 Feb 1 18:48 libcrypt-2.33.so
-rwxr-xr-x 1 root root 43280 Feb 1 18:48 libcrypt.so.1
-rwxr-xr-x 1 root root 1802576 Feb 1 18:48 libc.so.6
-rwxr-xr-x 1 root root 14544 Feb 1 18:48 libdl-2.33.so
-rwxr-xr-x 1 root root 14544 Feb 1 18:48 libdl.so.2
-rwxr-xr-x 1 root root 1309008 Feb 1 18:48 libm-2.33.so
-rwxr-xr-x 1 root root 18704 Feb 1 18:48 libmemusage.so
-rwxr-xr-x 1 root root 1309008 Feb 1 18:48 libm.so.6
I think that's a pretty bad change in behaviour, but now that I know, I can just stop using wildcards. I'm not sure if that's a bug or design. Something like this instead:
Code:find /storage2/test | xargs file | grep -e "executable" -e "shared object" | cut -f 1 -d : | xargs strip -p --strip-unneeded