Article 5DNPN Binutils 2.36 strip

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-unneededlatest?d=yIl2AUoC8zA latest?i=xleiNEZ7UL8:DO3HH8HJsFk:F7zBnMy latest?i=xleiNEZ7UL8:DO3HH8HJsFk:V_sGLiP latest?d=qj6IDK7rITs latest?i=xleiNEZ7UL8:DO3HH8HJsFk:gIN9vFwxleiNEZ7UL8
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments