tags:

views:

43

answers:

2

I know that there is the /proc/proc#/maps file that shows the libraries that are loaded, but is there a way to find out in which order the symbols are loaded?

+2  A: 

You can run the app under strace and watch dynamic linker mmap the libraries into process memory.

Nikolai N Fetissov
is there a better way to see only the mmap stuff since strace spits out a lot of data and it's hard to go through it all, even if I | grep mmap....?
bbazso
the -e mmap option filters for just mmap.
Ninefingers
I think you should accept @mark4o's answer - I totally forgot about the LD_DEBUG - it actually allows you to watch libraries loaded, symbols processing, bindings, etc.
Nikolai N Fetissov
+4  A: 

You can get all sorts of debug information using the LD_DEBUG environment variable. For example:

$ LD_DEBUG=files ls

This will execute ls and show you the shared libraries as they are loaded. Use LD_DEBUG=help for a list of other options.

mark4o