Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jun 2001 12:20:26 -0500 (CDT)
From:      Kevin Day <toasty@temphost.dragondata.com>
To:        dnelson@emsphone.com (Dan Nelson)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Access to symbol table(including dynamics) at runtime
Message-ID:  <200106081720.MAA43236@temphost.dragondata.com>
In-Reply-To: <20010608121616.A23647@dan.emsphone.com> from "Dan Nelson" at Jun 08, 2001 12:16:16 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> In the last episode (Jun 08), Kevin Day said:
> > Is there a simple way that I can lookup a symbol name(by address)
> > during runtime?
> > 
> > I know I can exec nm, look up for the address I need, and get local
> > symbols, but it would be really nice if I could get addresses of
> > functions in dynamic libraries as well. I know I could use ldd to get
> > offsets of each .so and calculate from there, but I'm starting to
> > think I'm reproducing work that was done somewhere else.
> > 
> > If someone could point me at a man page to something that can do what
> > I need, tell me of a library that does something similar, or tell me
> > why this can't be done, i'd be very thankful. :)
> 
> Would dladdr() do what you want?


AHH! YES!

I'll buy a beer to the first person who adds dladdr(3) to the SEE ALSO
section of dlopen's man page.

Thank you!


-- 
Kevin Day
toasty@dragondata.com - kevin@stileproject.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106081720.MAA43236>