On Wed, Oct 25, 2000 at 12:05:22PM -0400, Dan Sugalski wrote:
> At 05:02 PM 10/25/00 +0100, Nicholas Clark wrote:
> >On Wed, Oct 25, 2000 at 11:45:54AM -0400, Chaim Frenkel wrote:
> > > I vaguly can see a TIL that uses machine code linkage (real machine code
> > > jumps) that perhaps could use relative addressing as not needing
> > > relocation. But I'm not sure that all architectures support long enough
> > > relative jumps/calls.
> >
> >Specific example where you can't:
> >on ARM, the branch instructions (B and BL) are PC relative, but only have
> >a 24 bit offset field. The address space is (now) 32 bit, so there's parts
> >you can't reach without either calculating addresses (in another register)
> >and MOVing them to the PC, or loading the PC from a branch table in memory.
>
> I think the Alphas can be the same, though I vaguely remember the offset
> being something like 32 bits. I'm not sure we'd trip over either, but the
> possibility does exist.
>
> No matter what we do we're going to have fixup sections of some sort in the
> shared code that gets loaded in. There's no real way around that.
"fixup sections" sound horribly like something I've read in association
with a.out or ELF shared libraries. (I forget which)
Aren't we in danger of re-inventing the wheel here?
[with a.out, ELF and XFree86 having done it
http://www.xfree86.org/4.0.1/DESIGN17.html#65
]
Nicholas Clark