Subject: Re: kernel addresses: how?
To: None <current-users@sun-lamp.cs.berkeley.edu,>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: port-sparc
Date: 08/22/1994 22:46:40
> Can some kind soul explain what it is about this file that is telling
> gdb how to locate things at their proper addresses?  Provided I'm
> willing to hardwire 0xf8004000 as the effective N_TXTADDR, I can
> proceed with my patching plan...but (a) I don't like to charge ahead
> when there's something I don't understand hovering nearby, and (b) I
> shouldn't need to, as the file obviously contains this information
> _somewhere_, or gdb wouldn't be able to figure it out.

The information in a.out is not complete, but one can guess. If the entry
point is far enough beyond its "normal" location, gdb will assume that
this file is actually going to be loaded at a different address than the
standard N_TXTADDR(). In fact it assumes that the entry point rounded down
to a page address is the loading address. A similar hack applies to shared
libraries. Any other non-conformant image will currently not be handled
properly by gdb.


-pk

------------------------------------------------------------------------------