This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
get link map during execution
- From: Yannick PERRET <yperret at bat710 dot univ-lyon1 dot fr>
- To: binutils at sources dot redhat dot com
- Date: Mon, 04 Feb 2002 15:13:48 +0100
- Subject: get link map during execution
- Organization: UFR Info - Universite Claude Bernard Lyon1
Hi.
I'm writing a profiler for gcc-compiled C and C++ programs
(http://sourceforge.net/projects/fnccheck/)
The profiling part is fine, but I have a problem when trying
to convert symbol addresses into functions names.
I use BFD to open the program and convert addresses into names.
In order to allow profiling of dynamic libraries, I also open used
.so to solve unresolved addresses.
My only problem is about .so opened with 'dlopen' from 'dlfcn.h'.
These symbols are profiled but the references are not present in
the program (of course).
I'm now using 'link.h' to parse the existing libraries, and it appear
that objects opened with 'dlopen' are visible, but only between the
'dlopen' and the corresponding 'dlclose'.
Is there a way to get the complete list of used libraries at the end of
the execution (even those which are closed) ?
Thank you for any help or documentation about 'link.h' features
(I can't find anything in the libc info, neither in the gcc info).
Regards,
--
Yannick