www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/09/01:03:29

To: djgpp AT sun DOT soe DOT clarkson DOT edu
Cc: mat AT ardi DOT com (Mat Hostetter),
Charles Sandmann <sandmann AT new-orleans DOT NeoSoft DOT com>,
elf AT netcom DOT com (Marc Singer), Nigel Stephens <nigel AT algor DOT co DOT uk>
Subject: Re: object file format change?
Date: Thu, 08 Dec 94 17:32:01 PST
From: Jonathan Ryshpan <jon AT halsp DOT hitachi DOT com>

There have been many points raised in connection with the object file
format for djgpp version 2.0 -- should it be elf or coff.  In particular:

(1) It's desirable to be able to do cross development from other
    systems, in particular from Linux.

(2) Stabs, which are standard with elf, are a better debugging format
    than standard coff.

(3) Windows95 will use a form of coff for the object file format.

I think it will be better to use a form of coff for the object file
format.  In reference to these points:

(1) It will probably be most convenient to build a seperate instance of
    gcc on the development machine for cross compilation, even if the
    development machine is the same as the target (eg. i386), since the
    two targets (native and remote) will have different header files and
    libraries.

    Although this could be managed by appropriate environment variables.

(2) Stabs appear to be compatible with coff.  Using stabs would make it
    impossible to use the uSoft debugging tools, but Windows95 will
    probably support a reasonably robust debugging scheme, similar to
    the U**x ptrace() system call.  
    
    Here's what the gcc-2.5.8 manual has to say about stabs and coff.
    (Please excuse the length of the quote.)  I've never tried it, but
    it should work.  Any comments or experience?

    `--with-stabs'
          On MIPS based systems and on Alphas, you must specify whether
          you want GNU CC to create the normal ECOFF debugging format,
          or to use BSD-style stabs passed through the ECOFF symbol
          table.  The normal ECOFF debug format cannot fully handle
          languages other than C.  BSD stabs format can handle other
          languages, but it only works with the GNU debugger GDB.

          Normally, GNU CC uses the ECOFF debugging format by default;
          if you prefer BSD stabs, specify `--with-stabs' when you
          configure GNU CC.

          No matter which default you choose when you configure GNU CC,
          the user can use the `-gcoff' and `-gstabs+' options to
          specify explicitly the debug format for a particular
          compilation.

          `--with-stabs' is meaningful on the ISC system on the 386,
          also, if `--with-gas' is used.  It selects use of stabs
          debugging information embedded in COFF output.  This kind of
          debugging information supports C++ well; ordinary COFF
          debugging information does not.

(3) If Windows95 works as promised, the OS wars will be over (a
    depressing thought, but there you are).

    Since djgpp already supports coff, why change?  Some change will
    surely be necessary to support whatever weirdness is in the uSoft
    coff format, but this will be less painful than changing to elf and
    then back again.

Jonathan Ryshpan                <jon AT halsp DOT hitachi DOT com>

        ===============> I write for myself ONLY. <===============

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019