Date: Wed, 08 Dec 2010 12:47:34 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Tijl Coosemans <tijl@freebsd.org> 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/... Message-ID: <4CFF7056.3040808@FreeBSD.org> In-Reply-To: <201012071448.47319.tijl@freebsd.org> References: <201012052024.oB5KOMUF007051@svn.freebsd.org> <201012061718.13823.tijl@coosemans.org> <4CFD2E01.1000509@FreeBSD.org> <201012071448.47319.tijl@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CFF7056.3040808>