Date: Tue, 3 Aug 2004 10:02:01 -0700 From: "David O'Brien" <obrien@freebsd.org> To: Jon Noack <noackjr@alumni.rice.edu> Cc: Oliver Eikemeier <eikemeier@fillmore-labs.com> Subject: Re: upgrade of file(1) to 4.10 (including FreeBSD elf(5) fixes) Message-ID: <20040803170201.GA87300@dragon.nuxi.com> In-Reply-To: <410E3AA2.4030800@alumni.rice.edu> References: <B6D45422-E47D-11D8-9C56-00039312D914@fillmore-labs.com> <410E3AA2.4030800@alumni.rice.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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: > > > > <http://people.freebsd.org/~eik/patches/fileup.shar> > > > >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: > > <http://lists.freebsd.org/pipermail/freebsd-current/2004-June/thread.html#30172> > > *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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040803170201.GA87300>