Newsgroups: comp.os.linux.development
Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!xlink.net!
subnet.sub.net!rnihd!rnima!utex!michael
From: mich...@utex.rni.sub.org (Michael Utech)
Subject: coff, elf enough to run comapps?
Organization: RNI - Rhein Neckar Informationssysteme
Date: Mon, 11 Oct 1993 11:08:07 GMT
X-Newsreader: TIN [version 1.2 PL1]
Message-ID: <1993Oct11.110807.7102@utex.rni.sub.org>
Lines: 20

I understand that COFF and ELF are object file formats. I opened a
nutshell and read that this (coff) is not limited to intel
platforms. So i wonder whether having coff and/or elf support is
enough to run binaries compiled for eg. SCO, ISC Unices? How about
system calls, is their definition also covered by the object file
format? Will it be possible to run all (or at least majority of) SCO
binaries when coff support will be finished (or beta, gamma, ...)  for
Linux?

A related question: I read that Linux uses a.out (BSD's) OFF, but
it doesn't seem to be possible to run (386/Free)BSD(386). Right?

Greetings,
- Michael

PS: hope that this isn't a too frequently asked question :/
-- 
Michael Utech, Max-Planck-Str.26, 69519 Viernheim, Germany
email: mich...@utex.rni.sub.org, f...@rummelplatz.uni-mannheim.de
phone: +49 6204 {4031 (home), 65929 (work), 740309 (data)}

Newsgroups: comp.os.linux.development
Path: gmd.de!xlink.net!howland.reston.ans.net!paladin.american.edu!
darwin.sura.net!ra!tantalus.nrl.navy.mil!eric
From: e...@tantalus.nrl.navy.mil (Eric Youngdale)
Subject: Re: coff, elf enough to run comapps?
Message-ID: <CEsA1q.6xE@ra.nrl.navy.mil>
Sender: use...@ra.nrl.navy.mil
Organization: Naval Research Laboratory
References: <1993Oct11.110807.7102@utex.rni.sub.org>
Date: Tue, 12 Oct 1993 12:15:25 GMT
Lines: 28

In article <1993Oct11.110807.7...@utex.rni.sub.org> mich...@utex.rni.sub.org 
(Michael Utech) writes:
>I understand that COFF and ELF are object file formats. I opened a
>nutshell and read that this (coff) is not limited to intel
>platforms. So i wonder whether having coff and/or elf support is
>enough to run binaries compiled for eg. SCO, ISC Unices? How about
>system calls, is their definition also covered by the object file
>format? Will it be possible to run all (or at least majority of) SCO
>binaries when coff support will be finished (or beta, gamma, ...)  for
>Linux?

	The goal is to be able to directly run SCO format binaries.  The COFF
loader is more or less done, but some work is still needed on the IBCS2 syscall
emulation.  I really have no idea if when it will be finished.  Obviously the
idea is to be able to directly run some of the popular commercial SCO binaries.

	The ELF stuff really has two purposes.  One is to be able to directly
run linux compiled and linked ELF binaries (for which the tools are just
becoming available), and the second goal is to be able to directly run SVr4
style binaries.  Much of the syscall translation is done via a special shared
library.  This works for some simple programs, but there is missing emulation
for some functions.  I really need to get back to this soon, because some of
the problems that exist should not be that hard to correct.


-Eric
-- 
"The woods are lovely, dark and deep.  But I have promises to keep,
and lines to code before I sleep, and lines to code before I sleep."

Path: gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!
uunet!gatekeeper.us.oracle.com!barrnet.net!maddawg.sii.com!server1!longyear
From: longy...@server1.sii.com (Al Longyear)
Newsgroups: comp.os.linux.development
Subject: Re: coff, elf enough to run comapps?
Date: 12 Oct 1993 23:27:01 GMT
Organization: System Integrators, Inc.
Lines: 59
Message-ID: <29feg5$3dn@maddawg.sii.com>
References: <1993Oct11.110807.7102@utex.rni.sub.org>
NNTP-Posting-Host: server1.sii.com
X-Newsreader: TIN [version 1.2 PL2]

Michael Utech (mich...@utex.rni.sub.org) wrote:

> So i wonder whether having coff and/or elf support is
> enough to run binaries compiled for eg. SCO, ISC Unices? How about
> system calls, is their definition also covered by the object file
> format?  Will it be possible to run all (or at least majority of) SCO
> binaries when coff support will be finished (or beta, gamma, ...)  for
> Linux?

That is the goal!

The SCO, Interactive UNIX, and others use a standard called "Intel Binary
Compatibility Specification". The current version is version 2. (If you
wish documentation on the standard, it is available in a book by that title
published by McGraw-Hill.)

There is serious work being done now to provide a translation layer between
an IBCS2 application and the Linux operating system. Toward that end, you
will find in the current kernel a file called "elfabi". At the present time,
in the distributed kernels, it is simply a stub routine. The stub will be
replaced with a module which will translate the system calls, error numbers,
IOCTL requests (for some devices and terminals), stat() requests, etc. as
needed so that the program will believe that it is running on an IBCS2
compliant operating system.

The IBCS2 interpreter has just recently been enhanced to support the missing
IOCTL functions. However, releasing the pieces in a "dribble" fashion will
probably do more harm than good. What is needed is the complete package. We
must have shared libraries, X window support, ELF, COFF, and IBCS2. Having
just one piece will not do much good. (It would be like someone giving you
a key to an automobile but not give you the automobile. The key is nice.
The automobile is nice. However you must have both to make use of either.)

Linux is able to load three different object file formats: its own a.out,
ELF, and COFF. The IBCS2 specification defines an additional file format,
x.out. Whether or not this is done is not very significant. I will probably
write a loader for it (as I am able to generate the object files for this
format using an earlier SCO system) once work is complete on the shared
libraries for IBCS2. However, loading x.out is not very high on the list of
priorities. COFF will be totally satisfactory for SVr3 platform objects.

[Don't look for the _released_ kernel to load anything but a.out. If you
need COFF or ELF, then join the developer's mailing list and request the
location of the code there. We can use all of the help that you can offer.
(The X windows shared library must be done. Do you wish to help?)]

> A related question: I read that Linux uses a.out (BSD's) OFF, but
> it doesn't seem to be possible to run (386/Free)BSD(386). Right?

I rather doubt that Linux will be able to use BSD's a.out object file format,
however, I may be wrong. It is only an opinion. I can say that even if Linux
will load the program IT WILL NOT EXECUTE properly.

The conclusion to all of this is that the work has not stopped. It has simply
moved "under-ground".

> PS: hope that this isn't a too frequently asked question :/

--just lately. :-)