From owner-freebsd-arch Tue May 7 11: 9:37 2002 Delivered-To: freebsd-arch@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 740A237B404 for ; Tue, 7 May 2002 11:09:21 -0700 (PDT) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.3/8.12.2) with ESMTP id g47I92ev023922; Tue, 7 May 2002 11:09:02 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.3/8.12.3/Submit) id g47I91TM023921; Tue, 7 May 2002 11:09:01 -0700 (PDT) Date: Tue, 7 May 2002 11:09:01 -0700 From: "David O'Brien" To: Nathan Hawkins Cc: arch@FreeBSD.ORG Subject: Re: syscall changes to deal with 32->64 changes. Message-ID: <20020507110901.F23330@dragon.nuxi.com> Reply-To: arch@FreeBSD.ORG Mail-Followup-To: arch@freebsd.org References: <3CD7FE57.1000508@quic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3CD7FE57.1000508@quic.net>; from utsl@quic.net on Tue, May 07, 2002 at 12:18:31PM -0400 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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