* [patch 04/10] vmlinux.lds: add missing VMLINUX_SYMBOL macros
@ 2017-04-07 23:04 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-04-07 23:04 UTC (permalink / raw)
To: torvalds, mm-commits, akpm, jeyu, arnd, ewk, keescook
From: Jessica Yu <jeyu@redhat.com>
Subject: vmlinux.lds: add missing VMLINUX_SYMBOL macros
When __{start,end}_ro_after_init is referenced from C code, we run into the
following build errors on blackfin:
kernel/extable.c:169: undefined reference to `__start_ro_after_init'
kernel/extable.c:169: undefined reference to `__end_ro_after_init'
The build error is due to the fact that blackfin is one of the few arches
that prepends an underscore '_' to all symbols defined in C. Fix this by
wrapping __{start,end}_ro_after_init in vmlinux.lds.h with
VMLINUX_SYMBOL(), which adds the necessary prefix for arches that have
HAVE_UNDERSCORE_SYMBOL_PREFIX.
Link: http://lkml.kernel.org/r/1491259387-15869-1-git-send-email-jeyu@redhat.com
Signed-off-by: Jessica Yu <jeyu@redhat.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Eddie Kovsky <ewk@edkovsky.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/asm-generic/vmlinux.lds.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN include/asm-generic/vmlinux.lds.h~vmlinuxlds-add-missing-vmlinux_symbol-macros include/asm-generic/vmlinux.lds.h
--- a/include/asm-generic/vmlinux.lds.h~vmlinuxlds-add-missing-vmlinux_symbol-macros
+++ a/include/asm-generic/vmlinux.lds.h
@@ -261,9 +261,9 @@
*/
#ifndef RO_AFTER_INIT_DATA
#define RO_AFTER_INIT_DATA \
- __start_ro_after_init = .; \
+ VMLINUX_SYMBOL(__start_ro_after_init) = .; \
*(.data..ro_after_init) \
- __end_ro_after_init = .;
+ VMLINUX_SYMBOL(__end_ro_after_init) = .;
#endif
/*
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-07 23:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-07 23:04 [patch 04/10] vmlinux.lds: add missing VMLINUX_SYMBOL macros akpm
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.