Re: how to make gdb happy with my linkmap

Daniel Jacobowitz
2008-12-18T22:10:49Z

On Thu, Dec 18, 2008 at 11:02:22PM +0100, Mathieu Lacage wrote:
> > On SVR4 systems, basically, you can't. There is some information you
> > won't be able to update because it lives in the kernel (auxilliary
> > vector). This is one of the reasons I recently implemented "set
>
> erm, I might be totally naive, but, how does the libc loader achieve
> this then ? The only thing I am trying to do is be sufficiently
> compatible with the libc loader to make gdb happy with my loader. Did
> I mention that I am trying to replace the libc loader rather than try
> to make two loaders co-exist in the same process image (which would
> create another set of challenging problems from a compatibility
> perspective).

Oh! Sorry. Then I was off on a tangent. The salient difference is
whether your loader is started by the kernel based on a PT_INTERP
entry in the executable, or from the command line. If it's started
by PT_INTERP, things are much easier to handle.

The only things I can think of are having the main application first,
and having the debug function be named _dl_debug_state (because we set
a breakpoint before _r_debug is initialized). There's not much more
to it.

--
Daniel Jacobowitz
CodeSourcery