This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
runtime addresses of functions in shared objects
- To: gcc-help at gcc dot gnu dot org
- Subject: runtime addresses of functions in shared objects
- From: "Collins, Tom" <Tom dot Collins at Surgient dot com>
- Date: Tue, 3 Jul 2001 20:34:43 -0500
Hello...
Is there a way to determine the runtime addresses of functions that
reside in shared object files?
I am writing a profiler for an application in which I supply the mcount,
mstartup, and moncontrol functions. The mcount function obtains the
callers return address from the stack. I have a small multi-threaded
(cloned) application that I have tested this on, and it works fine.
What I am wondering is what to do with shared objects. Do they not
undergo relocation when they are loaded? If so, how do I find out
what those relocated addresses are for those functions in the shared
object?
Thanks