Subject: Re: compilers [was GNU stuff]
To: None <port-pmax@NetBSD.ORG>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 12/27/1994 11:55:19
I wrote:
[[suggesting that, for pmaxes, 4.4BSD and NetBSD's a.out formats converge]]

Ralph Campbell writes:
>I think this is reasonable. When I started, I just picked the natural byte
>order for DEC. I would like to see as few differences as possible to
>ease maintenance. I haven't heard of very many people using 4.4 DEC binaries
>so I don't feel the convertion would hurt a lot of folks.

Yes, that's what I'd heard too.

I think, and have thought for about two months, that the very very
best solution would be to use an identical ELF configuration for the
GNU tools on NetBSD and 4.4bsd on pmaxes, for those who use ELF; and
to use a single a.out format for both NetBSD and 4.4BSD on pmaxes, if
at all possible, and both camps find that satisfactory.  I don't see
any real need to have __two__ a.out machine IDs, one for mipsel/NetBSD
and another for mipsel/4.4BSD.  Surely the system calls haven't
diverged so much that this is necessary?  And for the rest, well,
caveat emptor :)

The requisite kernel changes for this, for 4.4BSD, should be about two
lines: to conditionally byteswap the magic number, if it looks
byteswapped.  I _think_ the rest of the a.out header encoding is
compatible.  I'd be happy to provide sample binaries to anyone willing
to experiment with this.

If we go this route, the ``other'' machine ID could be re-used for
big-endian mips processors.  In a world where a.out continues to be
useful, I beleive distinguishing big-endian mips binaries from
little-endian mips a.out binaries is far more important than
distinguishing 4.4SBD and NetBSD files.  And NetBSD will be using
a.out until some alternative like ELF works on _every_ platform.


>BTW, I don't think it would be hard to add .lit[48]
>support to the a.out GP relative stuff I did.

No, I didn't think it would be hard. The hard part is finding the time
to merge the a.out GP code into a BFD that does the byteswapping.  But
you're right, it really is the .lit8 support that current versions of
GCC need. I was careless in how I phrased my earlier message.  But I
have no idea how well, if at all, the a.out GP-relative addressing
would work for shared libraries.  Which is the stated rationale for
staying with the official NetBSD a.out format. If it works, this would
clearly be a good thing.  It's not yet clear to me that this is a
viable goal.