[PATCH 1/6] bootwrapper: arch/powerpc/boot code reorg
Mark A. Greer
mgreer at mvista.com
Thu Aug 3 02:58:31 EST 2006
On Wed, Aug 02, 2006 at 04:15:05PM +1000, Paul Mackerras wrote:
> I wrote:
> > The ops structure seems like a reasonable concept, but I question
> > whether we need to have platform_ops separate from fw_ops, since the
> > firmware is essentially part of the implementation of the platform.
> > Also I don't see why we need to do a double indirection to get to each
> > ops function.
> Thinking about this a bit more, why do we need the indirect function
> calls at all? Do we ever want to be able to choose (e.g.) one of
> several possible console implementations at runtime? Don't we know at
> compile time which one we will be using, and thus can't we use the
> linker to make the necessary linkages?
The hooking up was done at runtime for relocation reasons.
The got relocation code in crt0.S doesn't handle a function address
statically assigned to a structure member. I don't think its safe
to assume that 0x4000 is safe on all platforms, either, so relocation is
probably a fact of life. We could hack crt0.S instead, if you prefer?
More information about the Linuxppc-dev