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: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: "Mike Frysinger" <vapier.adi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ea44c1d60d
commit
c6de002617
@ -333,9 +333,9 @@
|
||||
#define BUG_TABLE \
|
||||
. = ALIGN(8); \
|
||||
__bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
|
||||
__start___bug_table = .; \
|
||||
VMLINUX_SYMBOL(__start___bug_table) = .; \
|
||||
*(__bug_table) \
|
||||
__stop___bug_table = .; \
|
||||
VMLINUX_SYMBOL(__stop___bug_table) = .; \
|
||||
}
|
||||
#else
|
||||
#define BUG_TABLE
|
||||
@ -345,9 +345,9 @@
|
||||
#define TRACEDATA \
|
||||
. = ALIGN(4); \
|
||||
.tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
|
||||
__tracedata_start = .; \
|
||||
VMLINUX_SYMBOL(__tracedata_start) = .; \
|
||||
*(.tracedata) \
|
||||
__tracedata_end = .; \
|
||||
VMLINUX_SYMBOL(__tracedata_end) = .; \
|
||||
}
|
||||
#else
|
||||
#define TRACEDATA
|
||||
@ -362,7 +362,7 @@
|
||||
|
||||
#define INITCALLS \
|
||||
*(.initcallearly.init) \
|
||||
__early_initcall_end = .; \
|
||||
VMLINUX_SYMBOL(__early_initcall_end) = .; \
|
||||
*(.initcall0.init) \
|
||||
*(.initcall0s.init) \
|
||||
*(.initcall1.init) \
|
||||
@ -383,9 +383,9 @@
|
||||
|
||||
#define PERCPU(align) \
|
||||
. = ALIGN(align); \
|
||||
__per_cpu_start = .; \
|
||||
VMLINUX_SYMBOL(__per_cpu_start) = .; \
|
||||
.data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \
|
||||
*(.data.percpu) \
|
||||
*(.data.percpu.shared_aligned) \
|
||||
} \
|
||||
__per_cpu_end = .;
|
||||
VMLINUX_SYMBOL(__per_cpu_end) = .;
|
||||
|
Loading…
Reference in New Issue
Block a user