From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: pkoning@equallogic.com
Cc: gdb@sources.redhat.com
Subject: Re: enable_break() in solib-svr4.c
Date: Mon, 15 Aug 2005 20:59:00 -0000 [thread overview]
Message-ID: <200508152059.j7FKx9S9027511@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <17152.63787.724675.956910@gargle.gargle.HOWL> (message from Paul Koning on Mon, 15 Aug 2005 16:20:59 -0400)
> Date: Mon, 15 Aug 2005 16:20:59 -0400
> From: Paul Koning <pkoning@equallogic.com>
>
> 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).
I seem to recall that we have had problems with this in the past, and
that MIPS is a bit of an odd one out in this respect. I also seem to
recall that NetBSD/MIPS changed some data structures in the dynamic
linker which doesn't make things easier for gdb. What version of
NetBSD are you using?
> 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.
It'd help if you actually attached your solution ;-).
Mark
next prev parent reply other threads:[~2005-08-15 20:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 20:21 Paul Koning
2005-08-15 20:59 ` Mark Kettenis [this message]
2005-08-31 20:31 ` Kevin Buettner
2005-08-31 21:14 ` Paul Koning
2005-08-31 21:20 ` Daniel Jacobowitz
2005-08-31 21:40 ` Paul Koning
2005-08-31 21:19 ` Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200508152059.j7FKx9S9027511@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb@sources.redhat.com \
--cc=pkoning@equallogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).