4

On my machine, ldd is showing libc.so.6 resolve to /lib64/ld-linux-x86-64.so.2

ldd binary
  /lib64/ld-linux-x86-64.so.2 (0x564329071000)
  libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x564329071000)
  libz.so.1 => /lib/libz.so.1 (0x7f7b1e631000)
  libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x564329071000)

I thought ldd's resolution was purely name-based, so it would roughly search for libc.so.6 (potentially with minor versions) in the ld search path. But I'm seeing it resolve to the ld library, which is a completely different name.

On another machine, it behaves as expected:

ldd binary
  linux-vdso.so.1 =>  (0x00007ffd467d4000)
  libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ffb22055000)
  libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ffb21e3b000)
  libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffb21a70000)
  /lib64/ld-linux-x86-64.so.2 (0x000055a9661b0000)

0 Answers0