From: Linus Benedict Torvalds (torvalds@klaava.Helsinki.FI)
Date: 07/16/92


From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
Subject: Re: Are Linux executables compatable with Coherent 4.0?
Date: 16 Jul 1992 22:25:59 GMT

In article <SJE.92Jul16142750@xylos.ma30.bull.com> sje@xylos.ma30.bull.com writes:
>The beta version of MWC Coherent 4.0 (32 bit flat addressing for the
>386+ CPU family) claims that it has SCO executable compatability for
>character I/O programs at the Intel Binary Interoperatibility Level
>(or whatever). MWC has gotten gcc to run allowing the production of
>ASNI C applications. However, there are only a limited number (less
>than 10) of officially converted applications. Given the apparently
>large number of programs now working under Linux, I was wondering if
>any of the Linux binaries, particularly gcc, may be run under Coherent
>4.0 without modification. Also, it would be interesting if the
>reverse was true.

No, linux binaries won't work under Coh4.0 nor vice versa. I don't know
if the actual header is a problem (linux uses the standard a.out header
that gcc produces), but system calls aren't handled the same way. I
personally think binary compatability is evil (or at least unnecessary)
and in most cases just forces old mistakes on a new product etc (just
look at DOS). And as there aren't any binaries available with the
standard i386 ABI anyway that I could afford and want to run, I saw no
reason to even try.

[ Not to mention the fact that I haven't got any information at all on
the "standard" binary interface - which makes things a bit hard to
program :-) ]

Of course, somebody might try to write a system call emulator that does
the necessary translations, but it would probably be pretty ugly. I
don't even know how a system call is handled under normal i386 unices:
linux uses "int $0x80" with all the necessary info in the registers, but
there are several other possibilities available (jumping through a
trap-gate with or without stack copying etc), and the chances that I
would hit on the same interface as other 386-unices are pretty slim.

                Linus