Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 May 2002 11:09:01 -0700
From:      "David O'Brien" <obrien@FreeBSD.ORG>
To:        Nathan Hawkins <utsl@quic.net>
Cc:        arch@FreeBSD.ORG
Subject:   Re: syscall changes to deal with 32->64 changes.
Message-ID:  <20020507110901.F23330@dragon.nuxi.com>
In-Reply-To: <3CD7FE57.1000508@quic.net>; from utsl@quic.net on Tue, May 07, 2002 at 12:18:31PM -0400
References:  <XFMail.20020507103320.jhb@FreeBSD.org> <3CD7FE57.1000508@quic.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 07, 2002 at 12:18:31PM -0400, Nathan Hawkins wrote:
> I'd like to see FreeBSD start using ELF .note.ABI-tag sections to handle 
> the binary OS type/versioning. I know that at least NetBSD, Linux and 
> Hurd do it this way, and I think most others do too.

Why?  Just to follow the NIH herd?  The EI_OSABI and EI_ABIVERSION fields
were in the gABI spec before anyone started using .note sections for
this.

If .note.ABI-tag is the end all and be all, then why did the ELF spec
authors even create EI_OSABI and EI_ABIVERSION??  And why did they put
things in the ELF header such that things are very easy to parse just by
reading a small amount of a binary?  A LOT of the things in an ELF header
could have been put in .note sections.  But they weren't because it is so
much easier to read fixed structures.

That said, run readelf on any FreeBSD binary, you will find a
.note.ABI-tag section.  I just never got around to adding support for it
to imgact_elf.


> It looks like gcc is already inserting them, (run readelf -S, and you

No, the section comes from crt1.o actually.

> should see it) so it'd be a matter of adding to the binary emulation
> selector to check .note.ABI-tag.
> For your new ABI, set a version number in the tag. I 
> believe the tag gcc is putting in already has a field for that.

We already put the value of __FreeBSD_version into .note.ABI-tag.
(see src/lib/csu/common/crtbrand.c)

-- 
-- David  (obrien@FreeBSD.org)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020507110901.F23330>