Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2013 20:39:37 -0700
From:      Jeremy Chadwick <jdc@koitsu.org>
To:        Daniel O'Connor <doconnor@gsoft.com.au>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Linux a.out binaries
Message-ID:  <20130418033937.GA20092@icarus.home.lan>
In-Reply-To: <07612CF9-2DE4-4980-BF03-DF56FBC79BE1@gsoft.com.au>
References:  <07612CF9-2DE4-4980-BF03-DF56FBC79BE1@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 18, 2013 at 11:47:01AM +0930, Daniel O'Connor wrote:
> I have some very old Linux a.out binaries that I have run on a FreeBSD 4 box. I recently tried them on a 9.1 system but I get an exec format error when trying to run them.
> 
> [obtuse 11:45] ~ >/usr/local/rsi/idl_4/bin/bin.linux/idl
> zsh: exec format error: /usr/local/rsi/idl_4/bin/bin.linux/idl
> [obtuse 11:45] ~ >file /usr/local/rsi/idl_4/bin/bin.linux/idl
> /usr/local/rsi/idl_4/bin/bin.linux/idl: Linux/i386 demand-paged executable (QMAGIC), stripped
> 
> I presume it has rotted and was removed, does anyone know when?

Good lord, the number of possibilities here are almost endless.  You
can't be serious...

My first inclination is to ask you if that FreeBSD system is amd64 or
i386.  Your Linux a.out binaries are i386.

If the FreeBSD system is amd64: I don't think this is going to work;
I see nothing in /sys/amd64/conf/* that indicates a.out is supported.
Sure, 32-bit binaries might be (with COMPAT_FREEBSD32), but that's
architecture, not format.

If the FreeBSD system is i386: /sys/i386/conf/NOTES mentions a kernel
option called COMPAT_AOUT, which **is not** enabled in GENERIC.  And of
course don't forget COMPAT_LINUX.

Also worth noting is the BUGS section of a.out(5).

-- 
| Jeremy Chadwick                                   jdc@koitsu.org |
| UNIX Systems Administrator                http://jdc.koitsu.org/ |
| Mountain View, CA, US                                            |
| Making life hard for others since 1977.             PGP 4BD6C0CB |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130418033937.GA20092>