Determine FreeBSD version of binary

Chuck Robey chuckr at
Thu Nov 8 16:43:46 PST 2007

John Smith wrote:
> I was wondering if it was possible to determine for what version of
> FreeBSD a binary was compiled, purely by examining the binary?

As a suggestion, use the 'ldd' command to see what version of the libc 
is linked in with the binary.  You didn['t mention if the binary was 
linked shared or not (if it's statically linked, well, you're out of 
luck with this particular method).    Depending on how it's linked, you 
might even have probnlems using ldd, I think, then you'd have to use the 
objdump utility, along with grep, like this:

objdump -x <whateverfile> | grep NEEDED | grep libc

and get the version of libc from there.  It's the version of libc that 
you're after with all this song and dance.  I've been gone from FreeBSD 
for a longish while (more than about 2 years) so I couldn't give you 
exact libc version versus date info, but if you post that to this list, 
most likely someone would have that right to hand.

> Any and all help and suggestions are greatly appreciated,
> Thanks,
> john Smith
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list