Which version of FreeBSD a binary was compiled for?

Micah micahjon at ywave.com
Thu Oct 27 11:21:20 PDT 2005


Will Maier wrote:
> On Thu, Oct 27, 2005 at 06:51:21AM -0700, Micah wrote:
> 
>>I have a 5.4 system, /do/ go into single user when upgrading, and
>>file does /not/ report FreeBSD version.  I get the same output you
>>do.  It would be nice to know why this works on some systems and
>>not on others.
> 
> 
> Consider diff'ing the /usr/share/misc/magic file from a system that
> works and a system that doesn't work. I'd expect the difference to
> be evident there.
> 
> It works find on all my machines, though.
> 

I have two 5.4 systems, one's a 5.4-Release installed from Disk, the 
other's a 5.4-release-p7 upgraded from 5.3 via the procedures in the 
handbook.  File on the former reports FreeBSD version, file on the 
latter does not.  There appears to be only minor differences in magic 
files between the two machines.  Copying the magic file from the working 
machine to the non-working machine and compiling it via file -c did not 
change anything.  Copying the executable from the working machine to the 
non-working machine did nothing either.

Note: alexis->5.4, trisha->5.4p7

alexis% file `which ethereal`
/usr/X11R6/bin/ethereal: ELF 32-bit LSB executable, Intel 80386, version 
1 (FreeBSD), for FreeBSD 5.4, dynamically linked (uses shared libs), 
stripped

trisha% file `which ethereal`
/usr/X11R6/bin/ethereal: ELF 32-bit LSB executable, Intel 80386, version 
1 (FreeBSD), dynamically linked (uses shared libs), stripped

Thanks,
Micah


More information about the freebsd-questions mailing list