I am starring at the ld.so manpage on my Debian stable system. It currently states:
$ man ld.so
[...]
NOTES
Hardware capabilities
Some shared objects are compiled using hardware-specific instructions which do not exist on every CPU. Such objects should be installed in directories whose names define the required hardware ca‐
pabilities, such as /usr/lib/sse2/. The dynamic linker checks these directories against the hardware of the machine and selects the most suitable version of a given shared object. Hardware capa‐
bility directories can be cascaded to combine CPU features. The list of supported hardware capability names depends on the CPU. The following names are currently recognized:
What surprises me is the last sentence:
The following names are currently recognized
That is currently not true (or at least not anymore), since all I can find is this:
% cat /etc/ld.so.conf.d/*
/usr/lib/x86_64-linux-gnu/libfakeroot
# Multiarch support
/usr/local/lib/i386-linux-gnu
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/usr/local/lib/i686-linux-gnu
/lib/i686-linux-gnu
/usr/lib/i686-linux-gnu
# libc default configuration
/usr/local/lib
# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
# Legacy biarch compatibility support
/lib32
/usr/lib32
# Legacy biarch compatibility support
/libx32
/usr/libx32
Is it true that ld.so will magically find a library in -say- /usr/lib/sse2/ on my machine ?
Reference:
% apt-cache policy manpages
manpages:
Installed: 5.10-1
Candidate: 5.10-1
Version table:
*** 5.10-1 500
500 http://deb.debian.org/debian bullseye/main amd64 Packages
500 http://deb.debian.org/debian bullseye/main i386 Packages
100 /var/lib/dpkg/status
For completeness here is the same output from a bullseye 32bits chroot:
% cat /etc/ld.so.conf.d/*
/usr/lib/i386-linux-gnu/libfakeroot
# Multiarch support
/usr/local/lib/i386-linux-gnu
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/usr/local/lib/i686-linux-gnu
/lib/i686-linux-gnu
/usr/lib/i686-linux-gnu
# libc default configuration
/usr/local/lib