From: Andrew Morton <akpm@linux-foundation.org>
To: "Mike Frysinger" <vapier.adi@gmail.com>
Cc: "Yoshinori Sato" <ysato@users.sourceforge.jp>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blackfin / h8300 build error fix
Date: Wed, 30 Jul 2008 20:37:41 -0700 [thread overview]
Message-ID: <20080730203741.4d7df2ad.akpm@linux-foundation.org> (raw)
In-Reply-To: <8bd0f97a0807302026x41d143b6p5c9eb63ef3185f06@mail.gmail.com>
On Wed, 30 Jul 2008 23:26:47 -0400 "Mike Frysinger" <vapier.adi@gmail.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().
next prev parent reply other threads:[~2008-07-31 3:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 15:58 [PATCH] blackfin / h8300 build error fix Yoshinori Sato
2008-07-30 16:11 ` Mike Frysinger
2008-07-30 19:22 ` Yoshinori Sato
2008-07-30 20:01 ` Andrew Morton
2008-07-31 0:26 ` [PATCH] Missing symbol prefix on vmlinux.lds.h Yoshinori Sato
2008-07-31 2:06 ` Andrew Morton
2008-07-31 3:20 ` Yoshinori Sato
2008-07-31 3:26 ` [PATCH] blackfin / h8300 build error fix Mike Frysinger
2008-07-31 3:37 ` Andrew Morton [this message]
2008-07-31 3:51 ` Mike Frysinger
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=20080730203741.4d7df2ad.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vapier.adi@gmail.com \
--cc=ysato@users.sourceforge.jp \
/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.