why is /bin/ls linking to libpthread?
It's not ls
itself that depends on libpthread
. Use lddtree
from pax-utils
(sudo apt install pax-utils
) to see the dependency tree:
# lddtree /bin/ls
ls => /bin/ls (interpreter => /lib/ld-linux-armhf.so.3)
libselinux.so.1 => /lib/arm-linux-gnueabihf/libselinux.so.1
libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6
ld-linux-armhf.so.3 => /lib/ld-linux-armhf.so.3
ldd
shows all shared libraries that the file links to, including indirect dependencies.