This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: problem with fetch_link_map_offsets
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: "Kris Warkentin" <kewarken at qnx dot com>
- Cc: Richard dot Earnshaw at arm dot com, "Kevin Buettner" <kevinb at redhat dot com>, "Gdb at Sources dot Redhat dot Com" <gdb at sources dot redhat dot com>
- Date: Tue, 10 Jun 2003 13:26:23 +0100
- Subject: Re: problem with fetch_link_map_offsets
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> > > Yeah but....a QNX binary is just an ordinary elf binary. There are no
> > > special sections or magic in there for the sniffer to catch. Hence my
> > > problem. Perhaps it should be returning unknown so that another sniffer
> > > (like my one liner) could get it?
> > >
> >
> > NetBSD binaries look like ordinary ELF too, as do Linux. The only way to
> > resolve this is to arange for the crt0.o file to contain some magic that
> > GDB can find. Normally this is a special .note section.
> >
> > Can you not arrange for QNX binaries to have such a note and then add
> that.
>
> Perhaps. I'll have to talk to some of the folk here. I think it would be
> really handy to be able to recognize one of our binaries. Thanks for the
> suggestion.
>
The note has other uses, too. For example, it can be used to ensure that
the kernel doesn't run applications that are intended for another
platform, or to enable an emulation mode if running such an app, or even
to give backwards compatibility if the kernel/user ABI changes.
R.