开发者

How do I track which libraries are being dynamically loaded by an application?

开发者 https://www.devze.com 2023-01-17 17:21 出处:网络
I have an application (for which I do not have the source code). I know that it is designed to dynamically load a shared library, depending on the command line parameters.

I have an application (for which I do not have the source code).

I know that it is designed to dynamically load a shared library, depending on the command line parameters.

I know which library it should be loading and I've set up LD_LIBRARY_PATH to the appropriate directory.

The application works on one server without any problems, but does not work on another.

I'm trying to figure out why and it would be helpful if I could confirm that the script is looking for the library that I think it is and if I could track where it is looking.

Are there any tools that could help me? I've been googling, but most of the information I'm finding is about ldd which really only tells you about statically linked libraries.

This is in a Linux environmen开发者_如何学JAVAt and the application and library are both written in C

Thanks


Use strace. You will see the libraries being searched etc., which will help you figure out what is happening.


As every shared library is memory-mapped into the process's address space, you can also inspect the /proc/[PID]/maps file.

0

精彩评论

暂无评论...
验证码 换一张
取 消