lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080730203741.4d7df2ad.akpm@linux-foundation.org>
Date:	Wed, 30 Jul 2008 20:37:41 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"Mike Frysinger" <vapier.adi@...il.com>
Cc:	"Yoshinori Sato" <ysato@...rs.sourceforge.jp>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] blackfin / h8300 build error fix

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

> you cant just use straight symbol names in common header files as they
> dont take into consideration weird arch-specific ABI conventions.  in
> the case of Blackfin/h8300, the ABI dictates that any C-visible
> symbols have an underscore prefixed to them.  thus all symbols in
> vmlinux.lds.h need to be wrapped in VMLINUX_SYMBOL() so that each arch
> can put hide this magic in their own files.

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().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ