All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] powerpc: Work around gcc miscompilation of __pa() on 64-bit
Date: Mon, 2 Sep 2013 12:01:10 +0930	[thread overview]
Message-ID: <20130902023110.GV3430@bubble.grove.modra.org> (raw)
In-Reply-To: <1378079952.3978.15.camel@pasglop>

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

  reply	other threads:[~2013-09-02  2:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27  6:07 [PATCH] powerpc: Work around gcc miscompilation of __pa() on 64-bit Paul Mackerras
2013-08-27  7:12 ` Alan Modra
2013-08-27  9:03   ` Paul Mackerras
2013-09-01 23:59   ` Benjamin Herrenschmidt
2013-09-02  2:31     ` Alan Modra [this message]
2013-09-02  5:06       ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130902023110.GV3430@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.