Subject: bin/12295: file(1) gives inconsistent results for ELF vs a.out.
To: None <email@example.com>
From: Charlie Root <firstname.lastname@example.org>
Date: 02/27/2001 14:19:27
>Synopsis: file(1) gives inconsistent results for ELF vs a.out.
>Arrival-Date: Tue Feb 27 13:10:01 PST 2001
>Originator: Charlie Root
>Release: 1.5<NetBSD-current source date>
System: NetBSD polaris 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (POLARIS) #1: Wed Dec 13 00:45:28 MST 2000 root@polaris:/usr/src/sys/arch/i386/compile/POLARIS i386
Recently.. attempting to determine if a given binary was a.out or ELF, I ran
file(1) on it, and got:
polaris# file /home/garbled/footest
/home/garbled/footest: NetBSD/i386 demand paged dynamically linked executable not stripped
This doesn't actually bother to tell me what format the binary is in, whereas
an ELF binary:
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1, statically linked, stripped
Does specifically mention ELF, but doesn't bother to tell me that it's a
I find both of these confusing.. The ELF case should say that it's a NetBSD
binary, and the a.out case should say a.out somewhere, not just infer that
it's a.out because it doesn't say ELF.
use file(1) on various binaries.
Fix the output. However, one should note that libtool and parts of bsd.pkg.mk
likely use file output for recognition of a.out vs ELF.