Subject: Re: Linux emulation problems
To: Andreas Gustafsson <gson@araneus.fi>
From: Jim Spath \(Webmaster Jim\) <jspath@mail.bcpl.lib.md.us>
List: netbsd-help
Date: 10/20/1996 13:13:27
On Sun, 20 Oct 1996, Andreas Gustafsson wrote:
> frank@fwi.uva.nl (Frank van der Linden) said:
> > > 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.
> > ...
> > Try the following patch to your 1.2 tree, recompile the kernel and tell
> > me if it works. If it does, this should be in an official patch to 1.2.

I'm having problems with Linux binaries also.  I'm probably doing
something wrong, but since the topic came up... 

I've put COMPAT_LINUX into my kernel options and recompiled.
I grabbed ldd, ldconfig, and other files from sunsite.
As a user, I get this:

bash# /usr/local/bin/ldconfig-linux 
bash: /usr/local/bin/ldconfig-linux: cannot execute binary file

As root, I get this:

stripey# /usr/local/bin/ldconfig-linux
/usr/local/bin/ldconfig-linux: Exec format error. Wrong Architecture.

The files are:
stripey# ls -l /usr/local/bin/*-linux
-rwxr-xr-x  1 jim  wheel  87465 Sep  9 19:40 /usr/local/bin/ldconfig-linux
-rwxr-xr-x  1 jim  wheel  79605 Sep  9 19:40 /usr/local/bin/ldd-linux
stripey# file  /usr/local/bin/*-linux
/usr/local/bin/ldconfig-linux: ELF 32-bit LSB executable, Intel 80386, \
  version 1
/usr/local/bin/ldd-linux:      ELF 32-bit LSB executable, Intel 80386, \
  version 1

I'm running 1.2, and installed the patch that Frank posted.  Still nogo.
Suggestions?