Reputation: 707
When I compile, I want to know exactly which shared libraries my executable relies on. Is there a way to get gcc to tell me the full path of the libraries it referenced during the linking process?
To be more specific, I am cross compiling for embedded linux. There are several versions of libstdc++.so in my file system. I need to make sure the executable references the correct one.
Upvotes: 0
Views: 1000
Reputation: 11831
You'll may want to look at the output of gcc -v ...
for the load (it is really the linker, ld(1)
, who figures that out from the paths given as arguments, or perhaps environment variables like LD_LIBRARY_PATH
). Or run ldd(1)
on the final executable.
Upvotes: 1