This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
.so addresses
- From: "Bäng-ha " <jpbarda at hotmail dot com>
- To: gdb at sources dot redhat dot com
- Date: Sun, 03 Mar 2002 21:21:17 +0000
- Subject: .so addresses
- Bcc:
Hi!
I'm sure this is a rather stupid question, but I'll ask it anyway:
I'm debugging a couple of processes under linux, and I want to load the
symbols from glibc. Now, the only way I've managed to figure out as to
perform the task of finding the base address of libc if to look at the
memory maps in /proc/?/maps, whence I get the base address of libc to be
e.g. 0x40020000 (this was for mingetty). So naturally, I do add-symbol-file
/lib/libc-2.2.2.so 0x4002000, but as it turns, it should be loaded
0x4003BCB0, i.e. at an offset of 0x1BCB0 from what /proc says. (I got the
exact offset from looking at the dynamically linked function tables and
comparing the read function to what was acutally loaded, if that would
somehow matter)
Anyway, I guess I could live with this small annoyance, if it wasn't for
that other libs wants to be loaded with other offsets. 0x1BCB0 didn't work
with e.g. libresolv. And, I want to know the cause of this as well, of
course.
So could someone tell me where to get the real offset from, because I can't
imagine that there isn't an error-free source to get the address from,
right?
Thanks in advance
Fredrik Tolf
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.