Re: upgrade of file(1) to 4.10 (including FreeBSD elf(5) fixes)

From: David O'Brien <obrien_at_freebsd.org>
Date: Tue, 3 Aug 2004 10:02:01 -0700
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_at_FreeBSD.org)
Received on Tue Aug 03 2004 - 15:03:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:04 UTC