Which version of FreeBSD a binary was compiled for?

Will Maier willmaier at ml1.net
Tue Oct 25 20:05:38 PDT 2005


On Wed, Oct 26, 2005 at 02:24:54AM +0400, Andrew P. wrote:
> How to tell? Apart from trying to launch it on different versions
> without COMPAT* in the kernel?

file (1)

> One can always carefully examine the output of ldd, readelf and
> other such tools, but that requires much knowledge and a small lab
> with all kinds of BSD's set up. Is there a better way?

| ~ % file /usr/local/bin/screen
| /usr/local/bin/screen: setuid ELF 32-bit LSB executable, Intel
| 80386, version 1 (FreeBSD), for FreeBSD 5.4, dynamically linked
| (uses shared libs), stripped
| ~ % uname -a
| FreeBSD vger.caenn.wisc.edu 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8
| #1: Tue Oct 11 20:19:50 CDT 2005
| root at myhost.net:/usr/obj/usr/src/sys/VGER20050925  i386

-- 

o--------------------------{ Will Maier }--------------------------o
| jabber:..wcmaier at jabber.ccc.de | email:..........wcmaier at ml1.net |
| \.........wcmaier at cae.wisc.edu | \..........wcmaier at cae.wisc.edu |
*------------------[ BSD Unix: Live Free or Die ]------------------*



More information about the freebsd-questions mailing list