Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does ldd show all recursive dependencies

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?

like image 299
Invictus Avatar asked Apr 21 '16 17:04

Invictus


1 Answers

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.

like image 196
sophros Avatar answered Sep 28 '22 19:09

sophros