[PATCH] powerpc: Work around gcc miscompilation of __pa() on 64-bit
Alan Modra
amodra at gmail.com
Mon Sep 2 12:31:10 EST 2013
On Mon, Sep 02, 2013 at 09:59:12AM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2013-08-27 at 16:42 +0930, Alan Modra wrote:
> > The proper fix is to define a whole slew of new relocations and reloc
> > specifiers, and modify everything to use them, but that seems like too
> > much bother. I had ideas once upon a time to implement gas and ld
> > options that makes @ha and _HA report overflows, but haven't found one
> > of those round tuits.
>
> 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.
--
Alan Modra
Australia Development Lab, IBM
More information about the Linuxppc-dev
mailing list