*BSD News Article 90608


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!goanna.cs.rmit.edu.au!news.apana.org.au!cantor.edge.net.au!news.teragen.com.au!news.access.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!dispatch.news.demon.net!demon!fido.news.demon.net!demon!sun4nl!wins.uva.nl!not-for-mail
From: frank@wins.uva.nl (Frank van der Linden)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Re: i386 netbsd 1.1, ELF, and Linux
Date: 7 Mar 1997 13:21:34 +0100
Organization: FWINS, University of Amsterdam
Distribution: world
Message-ID: <5fp18e$69v@mail.wins.uva.nl>
References: <331FDC81.159D@us.oracle.com>
NNTP-Posting-Host: mail.wins.uva.nl
Lines: 23
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.netbsd.misc:5579

>Can I run Linux ELF binaries on NetBSD 1.1 (on an i386 platform)? 
>I'm trying to run a statically linked Linux ELF binary 'foo'

>>file foo 
>"ELF 32-bit LSB executable, Intel 80386, version 1"

>>foo
>foo: Exec format error. Wrong Architecture.

>I have COMPAT_SVR4 and COMPAT_LINUX turned on in my kernel.

For statically linked ELF binaries, you should turn off COMPAT_SVR4;
it will get in the way of COMPAT_LINUX.

If you keep seeing bad system calls or exec format errors, you'll
probably have to upgrade. Some of the more recent Linux distributions
seem to contain binaries that just have 1 loadable section, and the
code in 1.1 doesn't deal with those (you'll need 1.2.1 for that,
which should be out soon). Also, some system calls were added to
Linux, and had to be added to the emulation as well. You might
run in to some of those.

- Frank