[RFA] Sparc/Linux fixes part 1
Richard Earnshaw
rearnsha@arm.com
Mon Apr 22 03:55:00 GMT 2002
> 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.
More information about the Gdb-patches
mailing list