Re: [PATCH] a.out: Stop building a.out/osf1 support on alpha and m68k

Linus Torvalds
2022-03-09T20:38:27Z

On Wed, Mar 9, 2022 at 12:04 PM Eric W. Biederman <ebiederm@xmission.com> wrote:
>
> Let's see if anyone cares about a.out support on the last two
> architectures that build it, by disabling the build of the support in
> Kconfig.

Oh, I'm pretty sure we can't do this.

a.out on alpha is afaik still very much alive - well, as alive as
anything alpha is - although it's called "ECOFF".

It's the native Tru64 (aka "DEC OSF/1", aka "Digital UNIX") format, so
it's more than some old legacy Linux thing.

We still call it "a.out", but the history is that a.out with some
extensions became COFF, which then became ECOFF, so our a.out code
really covers the whole gamut.

Yeah, we don't actually parse any of the extensions that make COFF
what it is, or ECOFF what _it_ is, but the a.out loader ends up
working "well enough" for simple binaries by using ugly code like

#define N_TXTOFF(x) \
((long) N_MAGIC(x) == ZMAGIC ? 0 : \
(sizeof(struct exec) + (x).fh.f_nscns*SCNHSZ + SCNROUND - 1) &
~(SCNROUND - 1))

which jumps over all the section headers.

But sure, it would be interesting to know if any alpha people care - I
just have this suspicion that we can't drop it that easily because of
the non-Linux legacy.

Linus