This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Embellishing fbsd_* emulations
On Thu, Apr 11, 2002 at 05:00:53PM -0700, Geoff Keating wrote:
> > Date: Thu, 11 Apr 2002 16:31:52 -0700
> > From: "David O'Brien" <obrien@FreeBSD.org>
>
> > Now that I have my set of emulations (fbsd_*) to play with, I would like
> > to set i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD and add a
> > .note.ABI-tag section. How would I do that [using ld/emulparams/*_fbsd.sh]?
>
> You really don't want to do the first one.
We REALLY do not want to get off on this topic again. It has been the
topic of a few quite heated threads. I thought the result was that most
did not like setting e_ident[EI_OSABI], however they would tolerate it
as long as it did not affect their platform. The FreeBSD toolchain
knowledgeable people really like e_ident[EI_OSABI]; and we will continue
to use it for the foreseeable future.
I modify Binutils to set e_ident[EI_OSABI] = ELFOSABI_FREEBSD when I pull
them into FreeBSD. I would like to have to do less customization. We
*MUST* have this set as the +&)^#$)# idiots that defined the gABI stuck
their heads in the sand and pretended static binaries do not exist. Thus
we have coded our elf image loader to depend on the e_ident[EI_OSABI]
value.
Yes I know Linux does not set it, yes I know Linux uses a .note.ABI-tag
section. In fact Linux binary compatibility is the reason we had to
start to use e_ident[EI_OSABI] -- which pre-dates Linux's use of
.note.ABI-tag. Linux does not have to run any non-Linux static ELF
binaries -- there are none for Solaris and I don't believe any other CPU
vendor is ELF. No the FreeBSD kernel does not obey .note.ABI-tag at this
time. We are also serious considering changing our ABI and will need to
bump OSABI_VERSION.
--
-- David (obrien@FreeBSD.org)