This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
a function's loaded address in memory
- From: "sean yang" <seanatpurdue at hotmail dot com>
- To: binutils at sourceware dot org
- Cc: seanatpurdue at hotmail dot com
- Date: Wed, 22 Feb 2006 05:00:09 +0000
- Subject: a function's loaded address in memory
- Bcc:
I use ptrace() to get the PC of system call site.
Say I get two system call invocation during runtime,
PC=0x8048988/sys_write() and PC=0x19279a/sys_write(). Can I know within
which function the system call is invoked?
For example, the 0x8048988/sys_write() should be from the "int 80(I wrote in
assembly)"
in main(); the 0x19279a/sys_write() should be from the "int 80" in the
write() of libc.so.
If I can know write() is (dynamically) loaded to 0x192780--0x19279c, then I
know that
0x19279a/sys_write() is from it because 0x19279a belongs to [0x192780,
0x19279c].
My question is: is there an easy mechanism that I can get the information of
which function is loaded where in a run?
Thanks a lot
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/