[gnu.gcc.bug] gas with COFF output

gnu@toad.com (01/13/89)

I've resurrected a chestnut from the archives about the preferred way to
support GNU software (languages in particular) on COFF systems:

Date: Thu, 5 May 88 12:02:31 EDT
From: rms@wheaties.ai.mit.edu (Richard Stallman)
Message-Id: <8805051602.AA07349@frosted-flakes.ai.mit.edu>
To: info-gcc@prep.ai.mit.edu, info-g++@prep.ai.mit.edu
Subject: GCC/G++, Gas, and COFF

Someone says he has converted GAS to produce COFF.  He said the
changes were not very widespread, but he has not done anything about
the debugging information.

If someone does make GAS able to substitute fully for the sysV assembler,
I would be interested in using the changes only if they do not make GAS
significantly harder to maintain.

I think this is not the right way to support GCC on sysV.  It would be better
to make sysV look more like a GNU system.  This involves two steps:

* Write a translator which will convert a library object module from
COFF to BSD format.  This isn't terribly hard because there is no debugging
information.

* Modify GNU ld to add a minimal amount of stuff to the front of a
BSD format file to make it executable by the kernel.  The symbol table
will remain in BSD format.  This should be very little change.

* Modify GDB to read such files.  This should be very little change.

Now you can replace all the software for compilation, etc., with the
GNU software.

-----

Gilmore here again, with two addenda.  Before you try tacking a COFF
object file header onto the loader output, just try running it with
your Sys V kernel.  Many Sys V kernels can still run the old V7/BSD
style a.out files!  The support has been there for years and it was
never ripped out.  Unisoft ports (A/UX in particular) are this way.

The translator from COFF libraries to BSD a.out libraries has been
written, though it may need some work (I don't know its current
status); mail "gnu@prep.ai.mit.edu" for more information.

	John Gilmore