Subject: Exec format error?
To: None <current-users@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: current-users
Date: 12/16/2002 23:29:34
So, I'm updating a system.  System is i386.  Kernel is NetBSD 1.6K.  Binaries
are:
	/bin/sh: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
	dynamically linked (uses shared libs), stripped

/bin/sh says "/bin/sh: Exec format error".

The kernel has EXEC_AOUT and EXEC_ELF32.

Furthermore, 'file /usr/bin/file' gives the same output as 'file /bin/sh'.

Is this likely to have to do with the new /lib shared libraries?  'ldd'
succeeds on both /usr/bin/file and /bin/sh; /bin/sh points to /lib/libc.so.12,
whereas /usr/bin/file points to /usr/lib/libc.so.12.  Both files exist, and
look "fine" - in fact, /usr/lib/libc.so.12 is itself a link to
/lib/libc.so.12.91.

To make it weirder, /usr/src is NFS-mounted.  On the NFS server (also NetBSD
1.6K/i386), "/usr/src/bin/sh/obj/sh" works.  On the client, it gets "Exec
format error".

The only difference I see is that the client doesn't have COMPAT_SVR4, but
it shouldn't need that, should it?

-s