From owner-svn-src-projects@FreeBSD.ORG Wed Dec 8 11:47:37 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 477D01065673; Wed, 8 Dec 2010 11:47:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 046108FC0C; Wed, 8 Dec 2010 11:47:37 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:8c19:df59:8444:adac] (unknown [IPv6:2001:7b8:3a7:0:8c19:df59:8444:adac]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id E55A55C5A; Wed, 8 Dec 2010 12:47:35 +0100 (CET) Message-ID: <4CFF7056.3040808@FreeBSD.org> Date: Wed, 08 Dec 2010 12:47:34 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.14pre) Gecko/20101201 Lanikai/3.1.8pre MIME-Version: 1.0 To: Tijl Coosemans References: <201012052024.oB5KOMUF007051@svn.freebsd.org> <201012061718.13823.tijl@coosemans.org> <4CFD2E01.1000509@FreeBSD.org> <201012071448.47319.tijl@freebsd.org> In-Reply-To: <201012071448.47319.tijl@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r216200 - in projects/binutils-2.17: contrib/binutils/bfd contrib/binutils/gas/config contrib/binutils/ld/emulparams gnu/usr.bin/binutils/libbfd sys/boot/ia64/efi sys/boot/ia64/ski sys/... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2010 11:47:37 -0000 On 2010-12-07 14:48, Tijl Coosemans wrote: > A third alternative :) Stop setting OSABI. Yes, that looks like a good alternative. It appears the kernel does not care too much about the OSABI field; if I hand-hack a static executable to reset the OSABI field to zero (aka 'SYSV'), it runs fine. It is sufficient that there is a .note.ABI-tag section in the file. > Looking at the binutils 2.20.1 BFD source the only files in which OSABI > is set to FreeBSD are: elf32-i386.c, elf64-alpha.c, elf64-sparc.c and > elf64-x86-64.c. For those architectures FreeBSD is the only OS that sets > OSABI. Since nobody cares about it maybe FreeBSD shouldn't either. The > field is redundant anyway given the .note.ABI-tag section. Indeed. There are some other OSes that seem to care about the field, but I don't see any real problem with just getting rid of it entirely. > I noticed the .note.ABI-tag section was missing from the ia64 startup > code (src/lib/csu/ia64/crt1.S). Adding it should fix the branding > problem reported on the mailing lists too and then there's no need for > hacks or special *-freebsd ELF formats. I verified this patch works on a ia64 box, it even looks nicer in file(1) output: test-before: ELF 64-bit LSB executable, IA-64, version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped test-after: ELF 64-bit LSB executable, IA-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900026), not stripped So as far as I'm concerned, you can just commit it. As an aside, I saw that lib/csu/ia64/crti.S and crtn.S miss .ident statements, and as a whole lib/csu seems a bit inconsistent with those. Some files use __FBSID(), others plain .ident statements, and yet others simply use .ascii, and put the ID's in the .rodata segment... I'll have a look at cleaning that up, I think. :)