From owner-freebsd-current@FreeBSD.ORG Tue Aug 3 17:03:52 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5823916A4CE for ; Tue, 3 Aug 2004 17:03:52 +0000 (GMT) Received: from TRANG.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0844D43D39 for ; Tue, 3 Aug 2004 17:03:52 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by TRANG.nuxi.com (8.13.1/8.12.11) with ESMTP id i73H25HC087799; Tue, 3 Aug 2004 10:02:05 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.13.1/8.13.1/Submit) id i73H216q087798; Tue, 3 Aug 2004 10:02:01 -0700 (PDT) (envelope-from obrien) Date: Tue, 3 Aug 2004 10:02:01 -0700 From: "David O'Brien" To: Jon Noack Message-ID: <20040803170201.GA87300@dragon.nuxi.com> Mail-Followup-To: David O'Brien , Jon Noack , Oliver Eikemeier , current@freebsd.org, Edwin Groothuis References: <410E3AA2.4030800@alumni.rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <410E3AA2.4030800@alumni.rice.edu> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 5.2-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 cc: Edwin Groothuis cc: current@freebsd.org cc: Oliver Eikemeier Subject: Re: upgrade of file(1) to 4.10 (including FreeBSD elf(5) fixes) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2004 17:03:52 -0000 On Mon, Aug 02, 2004 at 07:59:14AM -0500, Jon Noack wrote: > On 08/02/04 07:15, Oliver Eikemeier wrote: > >I've prepared an upgrade to file-4.10 at: > > > > > > > >This fixes > > > > PR bin/63830: [patch] file(1) doesn't recognize FreeBSD 5.x > >executables properly > > > >and an MFC will fix the problems of FreeBSD 4.10 being identified as > >4.9.1. I'll do some more testing (GCC 3.4) and think we should commit > >this before the 5.3 src freeze, especially since it has been discussed > >over a month ago: > > > > *sigh* Why does Christos Zoulas ignore me? He keeps telling me he'll > include my patch and then includes someone else's that doesn't fix the > problems. In any case, my patch (against file 4.09) to fix the versioning: > http://www.noacks.org/freebsd/readelf.c.diff I really wish Christos had never added the code to *GUESS* at what FreeBSD version a binary was compiled on. The ELF binary format specification totally does NOT support the ability to do this. file(1) makes GUESSES and has to use very FRAGILE HEURISTICS. It is dependent on a totally optional ELF .note section I add to binaries (which isn't even guaranteed to be in a binary), and whose format could change in the future. file(1) will forever have trouble accurately determining the OS version a program is compiled for. So we will surely have these types of bugs in the foreseeable future. I personally think the whole guessing code should just be removed from file(1) so we can get back to worrying about real bugs in FreeBSD. -- -- David (obrien@FreeBSD.org)