This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: enable_break() in solib-svr4.c
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Paul Koning <pkoning at equallogic dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 31 Aug 2005 13:30:45 -0700
- Subject: Re: enable_break() in solib-svr4.c
- References: <17152.63787.724675.956910@gargle.gargle.HOWL>
On Mon, 15 Aug 2005 16:20:59 -0400
Paul Koning <pkoning@equallogic.com> wrote:
> The code in solib-svr4.c in several places seems to assume that the
> shared lib loader is linked to base address 0, loaded somewhere else,
> and relocated at runtime -- and ditto for other libraries.
>
> I've just been battling a bug in enable_break, where the load address
> of the shared lib loader is added to a symbol address from the
> solib_break_names[] list. That produces nonsense on NetBSD/MIPS,
> because ldd.elf_so is linked to 5ffe0000 so that address is added to
> the symbol address (5ffexxxx).
>
> As a hack solution I have it add the load address only if the symbol
> value is less than the load address. It seems to me the correct way
> to cure this is to compute the relocation delta -- the difference
> between the load address and the as-linked VMA of the start of the
> library (from the program headers). I did something like this in
> svr4_relocate_section_addresses.
I too would like to see your solution, hack or not.
Is this issue different than the ones already discussed as part of the
following thread?
http://sources.redhat.com/ml/gdb/2002-12/msg00266.html
Kevin