How to track which libraries are dynamically loaded by an application?

I have an application (for which I have no source code).

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

I know which library should be loaded, and I set LD_LIBRARY_PATH to the appropriate directory.

The application runs 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 a library that I think is, and if I could keep track of where it looks.

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

This is in a Linux environment, and the application and library are written in C

thank

+3
source share
2 answers

Use strace. You will see a library search, etc., which will help you figure out what's going on.

+3
source

Since each shared library is stored in memory in the process address space, you can also check the / proc / [PID] / maps file.

0
source

Source: https://habr.com/ru/post/1766454/


All Articles