Subject: Re: cross-elf2ecoff
To: None <email@example.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 03/21/2002 21:09:01
In message <20020321205620.J534@dr-evil.shagadelic.org>,
Jason R Thorpe writes:
[bugs I think we all agree on]
>The less serious problem is that the ELF sections (and thus the ECOFF
>sections) are in the wrong order for some systems' firmware. This can
>mostly be corrected by using a linker script properly.
For some DEC proms, a further issue is that the PROM cares about the
order, not in which segments appear in the headers, but about the
order they appear in the file -- Even if the header lists the sections
in the "right" order. There are also some nasty issues about
expecting additional alignment and padding for the sections as they
appear in the load-file.
At some point mabye we just give up and go back to linking a separate
ECOFF version of the kernel/netboot loader, with linker scripts laying
out the desired order, from the get-go.
It's been a _looong_ time, but IIRC, back when we still did that for
mips, giving GNU lod -T<kernel text start in kseg space> invoked
special hardcoded layout magic that DTRT....
If all this is expressible with linker scripts, and it works on the
matrix of different PROM versions which Simon keeps, and it works on
ARC boxes, and it works for any ancient TC Alphas that need ECOFF,
I'll be very happy to buy Jason a beero for letting elf2ecoff die.