Subject: Linux emulation problems
To: None <netbsd-help@NetBSD.ORG>
From: Andreas Gustafsson <gson@araneus.fi>
List: netbsd-help
Date: 10/20/1996 15:07:58
I'm having trouble getting Linux ELF binaries to run under the
NetBSD/i386 1.2 Linux emulation.  Linux a.out binaries work fine, 
but execing ELF binaries fails.

Trying to run a /bin/ls binary copied from a Linux 1.3.25 system under
ktrace reveals the following:

   623 ktrace   CALL  execve(0xf7bfd8f7,0xf7bfd88c,0xf7bfd894)
   623 ktrace   NAMI  "/emul/linux/bin/ls.elf"
   623 ktrace   NAMI  "/emul/linux/lib/ld-linux.so.1"
   623 ktrace   RET   execve -1 errno 8 Exec format error

What is ld-linux.so.1?  It is not mentioned in the compat_linux(8) man
page.  I tried installing the file /lib/ld-linux.so.1 from the Linux
system under /emul/linux/lib, but still no luck:

   628 ktrace   CALL  execve(0xf7bfd8f7,0xf7bfd88c,0xf7bfd894)
   628 ktrace   NAMI  "/emul/linux/bin/ls.elf"
   628 ktrace   NAMI  "/emul/linux/lib/ld-linux.so.1"
   628 ktrace   NAMI  "/emul/linux"
   628 ktrace   NAMI  "/emul/linux/lib/ld-linux.so.1"
   628 ktrace   RET   execve -1 errno 12 Cannot allocate memory

   $ file /emul/linux/bin/ls.elf 
   /emul/linux/bin/ls.elf: ELF 32-bit LSB executable, Intel 80386, version 1

What am I doing wrong?
-- 
Andreas Gustafsson, gson@araneus.fi