All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Christoph Lameter <clameter@sgi.com>
Cc: Dong Feng <middle.fengdong@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: Unnecessary Relocation Hiding?
Date: Thu, 24 Aug 2006 21:24:14 +0200	[thread overview]
Message-ID: <200608242124.14504.ak@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0608241125140.4394@schroedinger.engr.sgi.com>

On Thursday 24 August 2006 20:26, Christoph Lameter wrote:
> On Wed, 23 Aug 2006, Dong Feng wrote:
> 
> > I have a question. Why shall we need a RELOC_HIDE() macro in the
> > definition of per_cpu()? Maybe the question is actually why we need
> > macro RELOC_HIDE() at all. I changed the following line in
> > include/asm-generic/percpu.h, from
> 
> Guess it was copied from IA64 but the semantics were not preserved.
> I think it should either be changed the way you suggest or the 
> implementation needs to be fixed to actually do a linker relocation.

The reason the original code is like it is because gcc assumes there
is no wrapping on arithmetic on symbol addresses (it is allowed to assume
that because it is undefined in the C standard). And in same cases wrapping
can happen. There was at least one miscompilation in the past that lead to the 
current construct.

-Andi

  reply	other threads:[~2006-08-24 19:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-23 12:00 Unnecessary Relocation Hiding? Dong Feng
2006-08-23 12:25 ` Dong Feng
2006-08-24 18:26 ` Christoph Lameter
2006-08-24 19:24   ` Andi Kleen [this message]
2006-08-24 23:31   ` Paul Mackerras
2006-08-25  1:30     ` Dong Feng
2006-08-25  3:49       ` Paul Mackerras
     [not found]         ` <a2ebde260608242329r12259e0k7e798ee1d8737d68@mail.gmail.com>
2006-08-25  6:39           ` Fwd: " Dong Feng
2006-08-25  6:18       ` Andi Kleen
2006-08-25  7:20         ` Paul Mackerras
2006-08-25  7:38           ` Andi Kleen

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=200608242124.14504.ak@suse.de \
    --to=ak@suse.de \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=middle.fengdong@gmail.com \
    /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.