Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Sep 2002 05:04:34 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Jake Burkholder <jake@locore.ca>, current@FreeBSD.ORG
Subject:   Re: aout support broken in gcc3 
Message-ID:  <20020902120434.0A4D42A893@canning.wemm.org>
In-Reply-To: <20020902205828.I3195-100000@gamplex.bde.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote:
> On Mon, 2 Sep 2002, Jake Burkholder wrote:
> 
> > Apparently, On Mon, Sep 02, 2002 at 02:24:08PM +1000,
> > 	Bruce Evans said words to the effect of;
> >
> > > aout support is still required for a few things (mainly for compiling
> > > some boot blocks), but is broken in gcc3 for at least compile-time
> >
> > Which boot blocks?
> 
> Oops, perhaps only mine.  (I use my version of biosboot which is like
> pc98/boot2 except it supports loading elf kernels and some local things,
> and it hasn't been converted to elf at the source level.)  When I wrote
> the above I thought that several standard boot blocks used OBJFORMAT=-aout.
> They actually just have a lot of ${OBJFORMAT} == aout ifdefs and
> elf2aout conversions.  Most of aout support at the source level seems to
> have been broken some time ago by using new gas features in assembler
> code.

I've been of the opinion for a while that it is well past time to remove
the hybrid a.out/ELF support in the compiler and stop pretending that we
support a.out.  All it does these days is slow down the compiler in the
usual case by pushing what are traditional compile-time decisions to
runtime.  As you point out, it hasn't worked for a while.

FreeBSD-3.x was a hybrid a.out/elf system
FreeBSD-4.x had vague a.out support but it was not installed by default.  It
            may not have been officially deprecated, but was all but.
FreeBSD-5.x should IMHO be a.out free.

We have a couple of things that still use a.out and they are fairly well
encapsulated.  btxld can produce a.out formats for the loader etc even when
fed ELF source files.  elf2aout is also there for the few cases that it is
needed.

The point of updating the toolchain was so that we could use non-archaic
assembler syntax.

If somebody really wants to build a.out stuff, I would suggest that the
thing to do there is to build a binutils with static a.out support (ie:
have a modern gas) and a gcc configured for a.out.  Most of the binutils
bits and bmake glue are around for building an a.out binutils in our tree
(or in the Attic).  We can possibly configure two different cc1 etc
backends for a.out and elf if it comes to that.

The only really interesting use for a.out is for interfacing kernels and
boot code with old roms.  The current binutils in the tree has sufficient
a.out support for that.  It cannot build dynamic binaries or shared libs
though, but that is no big deal.

gcc has grown a native -funderscores option to help with the source
C vs asm symbol compatability problems.

But quite frankly, I'd rather have a binutils-aout and gcc-aout port if we
really have to have a.out support still.

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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