public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <brgerst@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Tejun Heo <tj@kernel.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] x86-32: Fix __per_cpu_load relocation
Date: Mon, 26 Jan 2009 08:44:05 -0500	[thread overview]
Message-ID: <1232977445-11815-1-git-send-email-brgerst@gmail.com> (raw)
In-Reply-To: <20090126103243.GA31307@elte.hu>

This patch fixes this error:
WARNING: Absolute relocations present
Offset     Info     Type     Sym.Value Sym.Name
c0a4e07d 00e78001   R_386_32 c0ab0000  __per_cpu_load

Now, __per_cpu_load is a section-relative symbol:
c0aa4000 D __per_cpu_load
c0aa4000 A __per_cpu_load_abs

Signed-off-by: Brian Gerst <brgerst@gmail.com>
---
 include/asm-generic/vmlinux.lds.h |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 53e21f3..f3180a8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -451,17 +451,18 @@
  * end offset.
  */
 #define PERCPU_VADDR(vaddr, phdr)					\
-	VMLINUX_SYMBOL(__per_cpu_load) = .;				\
-	.data.percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load)		\
+	VMLINUX_SYMBOL(__per_cpu_load_abs) = .;				\
+	.data.percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load_abs)	\
 				- LOAD_OFFSET) {			\
 		VMLINUX_SYMBOL(__per_cpu_start) = .;			\
+		VMLINUX_SYMBOL(__per_cpu_load) = LOADADDR(.data.percpu) + LOAD_OFFSET;\
 		*(.data.percpu.first)					\
 		*(.data.percpu.page_aligned)				\
 		*(.data.percpu)						\
 		*(.data.percpu.shared_aligned)				\
 		VMLINUX_SYMBOL(__per_cpu_end) = .;			\
 	} phdr								\
-	. = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data.percpu);
+	. = VMLINUX_SYMBOL(__per_cpu_load_abs) + SIZEOF(.data.percpu);
 
 /**
  * PERCPU - define output section for percpu area, simple version
-- 
1.6.1


       reply	other threads:[~2009-01-26 13:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090126103243.GA31307@elte.hu>
2009-01-26 13:44 ` Brian Gerst [this message]
2009-01-26 14:18   ` [PATCH] x86-32: Fix __per_cpu_load relocation Ingo Molnar
2009-01-27  2:02     ` Tejun Heo
2009-01-27  4:03       ` Tejun Heo
2009-01-27  5:03         ` James Bottomley
2009-01-27  5:29           ` [PATCH 1/2 #tj-percpu] x86: fix build breakage on voyage Tejun Heo
2009-01-27  5:29             ` [PATCH 2/2 #tj-percpu] x86: clean up indentation in setup_per_cpu_areas() Tejun Heo
2009-01-27 11:37             ` [PATCH 1/2 #tj-percpu] x86: fix build breakage on voyage Ingo Molnar
2009-01-27 11:47               ` Tejun Heo
2009-01-27 12:50                 ` Brian Gerst
2009-01-27 13:11                 ` Ingo Molnar
2009-01-27 13:21                   ` Ingo Molnar
2009-01-27 15:33                 ` James Bottomley
2009-01-27 15:31               ` James Bottomley
2009-01-27 15:50                 ` Ingo Molnar
2009-01-27 16:04                   ` James Bottomley
2009-01-27 16:25                     ` Brian Gerst
2009-01-27 16:53                       ` James Bottomley
2009-01-27 10:52         ` [PATCH] x86-32: Fix __per_cpu_load relocation Ingo Molnar

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=1232977445-11815-1-git-send-email-brgerst@gmail.com \
    --to=brgerst@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox