Re: symbol table

2008-04-21 Thread M. Warner Losh
Apr 20, 2008 at 12:02:09PM +0300, emily becker wrote: : > : > Hi, : > : > : > : > I have a question about symbol table. : > : > One of the section In symbol table is memory adress which symbol is located. : > : > I wonder if this memory adress is bound at run-time or compi

Re: symbol table

2008-04-21 Thread Erik Trulsson
On Sun, Apr 20, 2008 at 11:24:32PM -0600, M. Warner Losh wrote: > In message: <[EMAIL PROTECTED]> > Erik Trulsson <[EMAIL PROTECTED]> writes: > : On Sun, Apr 20, 2008 at 12:02:09PM +0300, emily becker wrote: > : > Hi, > : > > : > I have a questi

Re: symbol table

2008-04-20 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Erik Trulsson <[EMAIL PROTECTED]> writes: : On Sun, Apr 20, 2008 at 12:02:09PM +0300, emily becker wrote: : > Hi, : > : > I have a question about symbol table. : > One of the section In symbol table is memory adress which symbol

Re: symbol table

2008-04-20 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> "emily becker" <[EMAIL PROTECTED]> writes: : Hi, : : I have a question about symbol table. : One of the section In symbol table is memory adress which symbol is located. : I wonder if this memory adress is bound at run-time or co

Re: symbol table

2008-04-20 Thread Erik Trulsson
On Sun, Apr 20, 2008 at 12:02:09PM +0300, emily becker wrote: > Hi, > > I have a question about symbol table. > One of the section In symbol table is memory adress which symbol is located. > I wonder if this memory adress is bound at run-time or compile-time? It depends. Symbo

symbol table

2008-04-20 Thread emily becker
Hi, I have a question about symbol table. One of the section In symbol table is memory adress which symbol is located. I wonder if this memory adress is bound at run-time or compile-time? if it is compile-time, I don't understand how do we know whether the symbol is located this adress.

Re: Access to symbol table(including dynamics) at runtime

2001-06-08 Thread Seth Kingsley
On Fri, Jun 08, 2001 at 12:17:41PM -0500, Kevin Day wrote: > I looked at this.. I see how I can dlopen my own executable, and dlsym() > will let me get addresses from symbol names, but how do I do the reverse? I > have an address and need to get the symbol name from it, not vice versa. dladdr(3)

Re: Access to symbol table(including dynamics) at runtime

2001-06-08 Thread Alfred Perlstein
* Kevin Day <[EMAIL PROTECTED]> [010608 13:21] wrote: > > > > 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,

Re: Access to symbol table(including dynamics) at runtime

2001-06-08 Thread Kevin Day
> > 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 > > functio

Re: Access to symbol table(including dynamics) at runtime

2001-06-08 Thread Kevin Day
> > Kevin Day wrote: > > > > Is there a simple way that I can lookup a symbol name(by address) during > > runtime? > > man dlopen. > I looked at this.. I see how I can dlopen my own executable, and dlsym() will let me get addresses from symbol names, but how do I do the reverse? I have an add

Re: Access to symbol table(including dynamics) at runtime

2001-06-08 Thread Dan Nelson
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 lib

Re: Access to symbol table(including dynamics) at runtime

2001-06-08 Thread Farooq Mela
Kevin Day wrote: > > Is there a simple way that I can lookup a symbol name(by address) during > runtime? man dlopen. -- farooq <[EMAIL PROTECTED]> To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: Access to symbol table(including dynamics) at runtime

2001-06-08 Thread Peter Pentchev
On Fri, Jun 08, 2001 at 12:09:39PM -0500, Kevin Day wrote: > > > 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 functi

Access to symbol table(including dynamics) at runtime

2001-06-08 Thread Kevin Day
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 o