This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Sparc/Linux fixes part 1
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: "David S. Miller" <davem at redhat dot com>
- Cc: ac131313 at cygnus dot com, msnyder at redhat dot com, gdb-patches at sources dot redhat dot com, Richard dot Earnshaw at arm dot com
- Date: Mon, 22 Apr 2002 11:54:56 +0100
- Subject: Re: [RFA] Sparc/Linux fixes part 1
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> From: Andrew Cagney <ac131313@cygnus.com>
> Date: Fri, 19 Apr 2002 22:46:23 -0400
>
> How does this Kernel, for instance, differentate between a GNU/Linux
> sparc binary and a Solaris binary when doing emulation?
>
> I'm going to delete the Solaris binary support any day now as an
> aside.
>
> The two binaries look identical, the both look like elf32_sparc.
> I don't know how many times I can say this.
>
> "The binaries look identical, but we screwed up on Sparc/Linux
> a long time ago and the long double type is 8 bytes instead of
> the ABI mandated 16 bytes. We are in no position to change this
> with the amount of existing binaries out there."
>
> There is no distinguising characterstic in the elf header nor anywhere
> else.
I'm sticking my nose in here where I probably don't know all the facts, so
please excuse me if I'm barking up the wrong tree...
glibc does provide a note in the executable, which as I understand it,
will differ between Linux and Solaris. Can you not assume that if the
note is missing entirely that you have a Sun/Solaris system and that if it
is present you can use it to determine the OS and hence the ABI?
See glibc/abi-tags and glibc/csu/abi-note.S
R.