Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Mathieu Lacage" <mathieu.lacage@gmail.com>
To: "Mathieu Lacage" <mathieu.lacage@gmail.com>, gdb@sourceware.org
Subject: Re: how to make gdb happy with my linkmap
Date: Thu, 18 Dec 2008 22:03:00 -0000	[thread overview]
Message-ID: <74fef6df0812181402n1debced5xbe3f402a3a34ecf2@mail.gmail.com> (raw)
In-Reply-To: <20081218214854.GA7706@caradoc.them.org>

On Thu, Dec 18, 2008 at 10:48 PM, Daniel Jacobowitz <drow@false.org> wrote:
> On Thu, Dec 18, 2008 at 10:41:20PM +0100, Mathieu Lacage wrote:
>> hi,
>>
>> I am currently trying to write a small ELF loader and make gdb be
>> happy with it.
>
> 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).

> wrapper"; if the loader is far enough along when GDB starts looking

will grep for this.

> at it, and has a link map already set up, then it will (generally)
> not go poking around the auxilliary vector.
>
>> Hence, my question: what are the requirements on the structure of a
>> linkmap which is compatible with gdb's usage (beyond the mere ABI
>> offset requirements).
>
> I don't think this is possible to answer.  The answer is that GDB is
> written to work as best it can with all the system loaders we've
> encountered.  If there's a change that would make things easier for
> your loader, without breaking any of those systems, you're welcome to
> propose it :-)

Ok, my question then, is: what can I do in my loader to be fully
compatible with what gdb expects  :) I am willing to go through quite
a bit of pain in the name of compatibility: whatever gdb asks me to do
will be probably orders of magnitude easier than what glibc is asking
me to provide

Mathieu
-- 
Mathieu Lacage <mathieu.lacage@gmail.com>


  reply	other threads:[~2008-12-18 22:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18 21:42 Mathieu Lacage
2008-12-18 21:49 ` Daniel Jacobowitz
2008-12-18 22:03   ` Mathieu Lacage [this message]
2008-12-18 22:10     ` Daniel Jacobowitz
2008-12-26 10:40       ` Mathieu Lacage
2008-12-26 12:54         ` Daniel Jacobowitz
2009-01-05 14:58           ` Mathieu Lacage
2009-01-05 17:13             ` Daniel Jacobowitz
2009-01-07 16:46               ` Doug Evans
2009-01-12 15:08             ` Mathieu Lacage

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=74fef6df0812181402n1debced5xbe3f402a3a34ecf2@mail.gmail.com \
    --to=mathieu.lacage@gmail.com \
    --cc=gdb@sourceware.org \
    /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