From owner-freebsd-current@FreeBSD.ORG Tue Aug 3 18:29:55 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 CCB8916A4FD; Tue, 3 Aug 2004 18:29:55 +0000 (GMT) Received: from fillmore.dyndns.org (port-212-202-50-15.dynamic.qsc.de [212.202.50.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5058543D5A; Tue, 3 Aug 2004 18:29:55 +0000 (GMT) (envelope-from eikemeier@fillmore-labs.com) Received: from dhcp-11.local ([172.16.0.11]) by fillmore.dyndns.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.41 (FreeBSD)) id 1Bs42o-000CO8-Uk; Tue, 03 Aug 2004 20:29:53 +0200 Date: Tue, 3 Aug 2004 20:31:15 +0200 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) To: obrien@freebsd.org From: Oliver Eikemeier In-Reply-To: <20040803170201.GA87300@dragon.nuxi.com> Message-Id: <4DA0F154-E57B-11D8-9C56-00039312D914@fillmore-labs.com> Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 cc: Edwin Groothuis cc: current@freebsd.org 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 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 18:29:56 -0000 David O'Brien wrote: > I really wish Christos had never added the code to *GUESS* at what > FreeBSD version a binary was compiled on. Everything what file(1) does is guesswork, nevertheless it is a great tool. > 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. As usual, file(1) has to follow. Anyway, since it works for now, and currently there is no reason to break it, why is it bad? I actually like that feature, and it is useful for debugging ports that should have been recompiled after a system upgrade. > 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. As stated above: I consider this to be a useful feature. file(1) is great at guessing, even when it is wrong sometimes. We could document the format, when you are afraid it would be too dangerous to depend on something undocumented. -Oliver