This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Determining base address of shared library from core file
- From: Kevin Buettner <kevinb at redhat dot com>
- To: "Bloch, Jack" <jack dot bloch at siemens dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 27 Jul 2004 14:48:09 -0700
- Subject: Re: Determining base address of shared library from core file
- Organization: Red Hat
- References: <7A25937D23A1E64C8E93CB4A50509C2A0310F2CC@stca204a.bus.sc.rolm.com>
On Mon, 26 Jul 2004 14:13:40 -0700
"Bloch, Jack" <jack.bloch@siemens.com> wrote:
> BTW, if I run readelf -d on my executable, it show a debug segment with a
> 0x0. I don't have to load the executable into memory somehow do I?
Yes, you have to fetch the dynamic section from the loaded process and
scan it instead of the contents of the executable. The dynamic linker
will have adjusted the in-memory copy of the dynamic section to contain
values relevant to the running process.
Kevin