[PATCH] [POWERPC] Fix bootwrapper builds with newer gcc versions

Segher Boessenkool segher at kernel.crashing.org
Sat May 3 10:06:51 EST 2008

>> That is, it would be fairly non-sensical for module code to go through
>> the trampoline to call those stubs in the kernel (and having to

You can link every module to libgcc separately.  Probably it can also
be set up so that some libgcc routines get linked into the kernel,
and exported, and the rest is linked into every module that wants
them.  We can also blacklist some symbols altogether (__udivdi3...)

> Oh, I forgot about how far function calls are done on powerpc.
> Yes, that will suck.
> Is there some way to map all of the modules in the low 32-bits and
> thus aovid the trampolines?  The powerpc call instruction can cover
> 4GB like on sparc right?

A direct call reaches +-32MB, either relative or absolute; an indirect
call can go anywhere.

> Actually, I remember there is some linkage register that has
> to be setup on powerpc with the code model you guys use, is
> that the problem?

I think the problem is just that the compiler generates "near" calls
(the 32MB thing) because of the code model used, but things don't
necessarily end up this close by at run time.


More information about the Linuxppc-dev mailing list