public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* enable_break() in solib-svr4.c
@ 2005-08-15 20:21 Paul Koning
  2005-08-15 20:59 ` Mark Kettenis
  2005-08-31 20:31 ` Kevin Buettner
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Koning @ 2005-08-15 20:21 UTC (permalink / raw)
  To: gdb

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. 

	 paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-08-31 21:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-15 20:21 enable_break() in solib-svr4.c Paul Koning
2005-08-15 20:59 ` Mark Kettenis
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

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).