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?
views:
43answers:
2
+2
A:
You can run the app under strace
and watch dynamic linker mmap
the libraries into process memory.
Nikolai N Fetissov
2010-02-12 21:21:29
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
2010-02-12 21:46:39
the -e mmap option filters for just mmap.
Ninefingers
2010-02-12 21:50:11
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
2010-02-12 21:51:34
+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
2010-02-12 21:30:50