diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-09 10:23:49 +0300 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-17 16:44:57 +0300 |
commit | 94e58e0ac31284fa26597c0e00a9b1d87a691d02 (patch) | |
tree | 4822cf5019a6e5eaa70ca8487bb737bacb9f0006 /include/linux/export.h | |
parent | 5a144a1acd0b4b4afd1b2695f7231b58e8848ce6 (diff) | |
download | linux-94e58e0ac31284fa26597c0e00a9b1d87a691d02.tar.xz |
export.h: remove code for prefixing symbols with underscore
CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX was selected by BLACKFIN, METAG.
They were removed by commit 4ba66a976072 ("arch: remove blackfin port"),
commit bb6fb6dfcc17 ("metag: Remove arch/metag/"), respectively.
No more architecture enables CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
Clean up the export.h headers. I am keeping VMLINUX_SYMBOL() and
VMLINUX_SYMBOL_STR() because they are widely used.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'include/linux/export.h')
-rw-r--r-- | include/linux/export.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/include/linux/export.h b/include/linux/export.h index 1a1dfdb2a5c6..b768d6dd3c90 100644 --- a/include/linux/export.h +++ b/include/linux/export.h @@ -10,14 +10,8 @@ * hackers place grumpy comments in header files. */ -/* Some toolchains use a `_' prefix for all user symbols. */ -#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX -#define __VMLINUX_SYMBOL(x) _##x -#define __VMLINUX_SYMBOL_STR(x) "_" #x -#else #define __VMLINUX_SYMBOL(x) x #define __VMLINUX_SYMBOL_STR(x) #x -#endif /* Indirect, so macros are expanded before pasting. */ #define VMLINUX_SYMBOL(x) __VMLINUX_SYMBOL(x) @@ -46,14 +40,14 @@ extern struct module __this_module; #if defined(CONFIG_MODULE_REL_CRCS) #define __CRC_SYMBOL(sym, sec) \ asm(" .section \"___kcrctab" sec "+" #sym "\", \"a\" \n" \ - " .weak " VMLINUX_SYMBOL_STR(__crc_##sym) " \n" \ - " .long " VMLINUX_SYMBOL_STR(__crc_##sym) " - . \n" \ + " .weak __crc_" #sym " \n" \ + " .long __crc_" #sym " - . \n" \ " .previous \n"); #else #define __CRC_SYMBOL(sym, sec) \ asm(" .section \"___kcrctab" sec "+" #sym "\", \"a\" \n" \ - " .weak " VMLINUX_SYMBOL_STR(__crc_##sym) " \n" \ - " .long " VMLINUX_SYMBOL_STR(__crc_##sym) " \n" \ + " .weak __crc_" #sym " \n" \ + " .long __crc_" #sym " \n" \ " .previous \n"); #endif #else @@ -66,7 +60,7 @@ extern struct module __this_module; __CRC_SYMBOL(sym, sec) \ static const char __kstrtab_##sym[] \ __attribute__((section("__ksymtab_strings"), aligned(1))) \ - = VMLINUX_SYMBOL_STR(sym); \ + = #sym; \ static const struct kernel_symbol __ksymtab_##sym \ __used \ __attribute__((section("___ksymtab" sec "+" #sym), used)) \ |