[PATCH] powerpc: Work around gcc miscompilation of __pa() on 64-bit

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon Sep 2 15:06:16 EST 2013


On Mon, 2013-09-02 at 12:01 +0930, Alan Modra wrote:
> > No, if you don't have a reloc that can represent this, then the proper
> > fix is to use the existing relocs to load the original symbol address
> > into a register, then *generate* the appropriate 64-bit addition on top
> > of it.
> 
> I already have a gcc fix to do exactly that.  My "proper fix" comment
> was more to do with the general case.  For example, when linking a
> huge object that overflows _HA relocs right now we silently generate
> bad code.

Ah that is nice indeed :-) In that case I assume we can't have the offset
itself be part of the TOC :-) Chicken or egg ?

Not sure what's the right fix here is, we don't want to always reserve
enough instructions "space" to do a full 64-bit offset load...

Ben.




More information about the Linuxppc-dev mailing list