Commit c6de0026 authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds

Missing symbol prefix on vmlinux.lds.h

ARCH=h8300:

init/main.c:781: undefined reference to `___early_initcall_end'

Same problem have
__start___bug_table
__stop___bug_table
__tracedata_start
__tracedata_end
__per_cpu_start
__per_cpu_end

When defining a symbol in vmlinux.lds, use the VMLINUX_SYMBOL macro.
VMLINUX_SYMBOL adds a prefix charactor.

You can't 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.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: default avatarYoshinori Sato <ysato@users.sourceforge.jp>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: "Mike Frysinger" <vapier.adi@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ea44c1d6
...@@ -333,9 +333,9 @@ ...@@ -333,9 +333,9 @@
#define BUG_TABLE \ #define BUG_TABLE \
. = ALIGN(8); \ . = ALIGN(8); \
__bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \ __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
__start___bug_table = .; \ VMLINUX_SYMBOL(__start___bug_table) = .; \
*(__bug_table) \ *(__bug_table) \
__stop___bug_table = .; \ VMLINUX_SYMBOL(__stop___bug_table) = .; \
} }
#else #else
#define BUG_TABLE #define BUG_TABLE
...@@ -345,9 +345,9 @@ ...@@ -345,9 +345,9 @@
#define TRACEDATA \ #define TRACEDATA \
. = ALIGN(4); \ . = ALIGN(4); \
.tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \ .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
__tracedata_start = .; \ VMLINUX_SYMBOL(__tracedata_start) = .; \
*(.tracedata) \ *(.tracedata) \
__tracedata_end = .; \ VMLINUX_SYMBOL(__tracedata_end) = .; \
} }
#else #else
#define TRACEDATA #define TRACEDATA
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
#define INITCALLS \ #define INITCALLS \
*(.initcallearly.init) \ *(.initcallearly.init) \
__early_initcall_end = .; \ VMLINUX_SYMBOL(__early_initcall_end) = .; \
*(.initcall0.init) \ *(.initcall0.init) \
*(.initcall0s.init) \ *(.initcall0s.init) \
*(.initcall1.init) \ *(.initcall1.init) \
...@@ -383,9 +383,9 @@ ...@@ -383,9 +383,9 @@
#define PERCPU(align) \ #define PERCPU(align) \
. = ALIGN(align); \ . = ALIGN(align); \
__per_cpu_start = .; \ VMLINUX_SYMBOL(__per_cpu_start) = .; \
.data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \ .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \
*(.data.percpu) \ *(.data.percpu) \
*(.data.percpu.shared_aligned) \ *(.data.percpu.shared_aligned) \
} \ } \
__per_cpu_end = .; VMLINUX_SYMBOL(__per_cpu_end) = .;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment