Re: [PATCH] blackfin / h8300 build error fix

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Wednesday, July 30, 2008 - 8:37 pm

On Wed, 30 Jul 2008 23:26:47 -0400 "Mike Frysinger" <vapier.adi@gmail.com> wrote:


ooh, a changelog.

This seems to be a pretty common failing.  I just had to fix the same
problem in a linux-next patch:

diff -puN include/asm-generic/vmlinux.lds.h~zero-based-percpu-use-vmlinux_symbol-in-include-asm-generic-vmlinuxldsh include/asm-generic/vmlinux.lds.h
--- a/include/asm-generic/vmlinux.lds.h~zero-based-percpu-use-vmlinux_symbol-in-include-asm-generic-vmlinuxldsh
+++ a/include/asm-generic/vmlinux.lds.h
@@ -385,15 +385,15 @@
 #define PERCPU(align)							\
 	. = ALIGN(align);						\
 	percpu : { } :percpu						\
-	__per_cpu_load = .;						\
-	.data.percpu 0 : AT(__per_cpu_load - LOAD_OFFSET) {		\
+	VMLINUX_SYMBOL(__per_cpu_load) = .;				\
+	.data.percpu 0 : AT(VMLINUX_SYMBOL(__per_cpu_load) - LOAD_OFFSET) { \
 		*(.data.percpu.first)					\
 		*(.data.percpu.shared_aligned)				\
 		*(.data.percpu)						\
 		*(.data.percpu.page_aligned)				\
-		____per_cpu_size = .;					\
+		VMLINUX_SYMBOL(____per_cpu_size) = .;			\
 	}								\
-	. = __per_cpu_load + ____per_cpu_size;				\
+	. = VMLINUX_SYMBOL(__per_cpu_load) + VMLINUX_SYMBOL(____per_cpu_size); \
 	data : { } :data
 #else
 #define PERCPU(align)							\
_

(haven't tested it yet).

It's going to keep happening too, unless we find some way of making x86
break when people forget to use VMLINUX_SYMBOL().
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] blackfin / h8300 build error fix, Yoshinori Sato, (Wed Jul 30, 8:58 am)
Re: [PATCH] blackfin / h8300 build error fix, Mike Frysinger, (Wed Jul 30, 9:11 am)
Re: [PATCH] blackfin / h8300 build error fix, Yoshinori Sato, (Wed Jul 30, 12:22 pm)
Re: [PATCH] blackfin / h8300 build error fix, Andrew Morton, (Wed Jul 30, 1:01 pm)
Re: [PATCH] Missing symbol prefix on vmlinux.lds.h, Yoshinori Sato, (Wed Jul 30, 5:26 pm)
Re: [PATCH] Missing symbol prefix on vmlinux.lds.h, Andrew Morton, (Wed Jul 30, 7:06 pm)
Re: [PATCH] Missing symbol prefix on vmlinux.lds.h, Yoshinori Sato, (Wed Jul 30, 8:20 pm)
Re: [PATCH] blackfin / h8300 build error fix, Mike Frysinger, (Wed Jul 30, 8:26 pm)
Re: [PATCH] blackfin / h8300 build error fix, Andrew Morton, (Wed Jul 30, 8:37 pm)
Re: [PATCH] blackfin / h8300 build error fix, Mike Frysinger, (Wed Jul 30, 8:51 pm)