Does ldd show all recursive dependencies

Invictus picture Invictus · Apr 21, 2016 · Viewed 7.4k times · Source

Suppose I have a A.so file whose dependencies are found from ldd

#ldd A
[...]
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007faaf9722000)
libxyz.so.49 => /usr/lib64/libxyz.so.49 (0x00007faaf5689000)

Now does this mean that with the presence of libxml2.so.2 and libxyz.so.49 everything is set for me to use A.so. How about if libxyz.so.49 internally has a dependency on some libabc.so.2.

I want to clarify if that was so will libabc.so.2 get listed when dependency of A.so is found from ldd or will that be not reflected? If not then how can I find all inter-dependencies? Can a missing inter-dependency down the chain with a call going to it and absence of the same result into core/crash?

Answer

sophros picture sophros · Jul 21, 2017

According to this answer ldd shows all dynamic libraries required for a given binary to run the application. This includes the transitive dependencies you are asking for.