Blame view
include/asm-generic/export.h
2.25 KB
bf49d9dd6 export,module: ad... |
1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
22823ab41 EXPORT_SYMBOL() f... |
2 3 4 5 6 7 |
#ifndef __ASM_GENERIC_EXPORT_H #define __ASM_GENERIC_EXPORT_H #ifndef KSYM_FUNC #define KSYM_FUNC(x) x #endif |
ed13fc33f export: explicitl... |
8 9 10 |
#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS #define KSYM_ALIGN 4 #elif defined(CONFIG_64BIT) |
22823ab41 EXPORT_SYMBOL() f... |
11 |
#define KSYM_ALIGN 8 |
22823ab41 EXPORT_SYMBOL() f... |
12 |
#else |
22823ab41 EXPORT_SYMBOL() f... |
13 14 15 16 17 |
#define KSYM_ALIGN 4 #endif #ifndef KCRC_ALIGN #define KCRC_ALIGN 4 #endif |
22823ab41 EXPORT_SYMBOL() f... |
18 |
|
7290d5809 module: use relat... |
19 20 |
.macro __put, val, name #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS |
069e1c07c module: Fix link ... |
21 22 |
.long \val - ., ame - ., 0 |
7290d5809 module: use relat... |
23 |
#elif defined(CONFIG_64BIT) |
8651ec01d module: add suppo... |
24 25 |
.quad \val, ame, 0 |
7290d5809 module: use relat... |
26 |
#else |
8651ec01d module: add suppo... |
27 28 |
.long \val, ame, 0 |
7290d5809 module: use relat... |
29 30 |
#endif .endm |
22823ab41 EXPORT_SYMBOL() f... |
31 |
/* |
ce2b617ce export.h: reduce ... |
32 33 34 |
* note on .section use: we specify progbits since usage of the "M" (SHF_MERGE) * section flag requires it. Use '%progbits' instead of '@progbits' since the * former apparently works on all arches according to the binutils source. |
22823ab41 EXPORT_SYMBOL() f... |
35 |
*/ |
ce2b617ce export.h: reduce ... |
36 |
|
22823ab41 EXPORT_SYMBOL() f... |
37 38 |
.macro ___EXPORT_SYMBOL name,val,sec #ifdef CONFIG_MODULES |
22823ab41 EXPORT_SYMBOL() f... |
39 40 41 |
.section ___ksymtab\sec+ ame,"a" .balign KSYM_ALIGN |
94e58e0ac export.h: remove ... |
42 43 44 45 |
__ksymtab_ ame: __put \val, __kstrtab_ ame |
22823ab41 EXPORT_SYMBOL() f... |
46 |
.previous |
ce2b617ce export.h: reduce ... |
47 |
.section __ksymtab_strings,"aMS",%progbits,1 |
94e58e0ac export.h: remove ... |
48 49 |
__kstrtab_ ame: |
22823ab41 EXPORT_SYMBOL() f... |
50 51 |
.asciz " ame" |
22823ab41 EXPORT_SYMBOL() f... |
52 53 54 55 56 |
.previous #ifdef CONFIG_MODVERSIONS .section ___kcrctab\sec+ ame,"a" .balign KCRC_ALIGN |
71810db27 modversions: trea... |
57 |
#if defined(CONFIG_MODULE_REL_CRCS) |
94e58e0ac export.h: remove ... |
58 59 |
.long __crc_ ame - . |
71810db27 modversions: trea... |
60 |
#else |
94e58e0ac export.h: remove ... |
61 62 |
.long __crc_ ame |
71810db27 modversions: trea... |
63 |
#endif |
94e58e0ac export.h: remove ... |
64 65 |
.weak __crc_ ame |
22823ab41 EXPORT_SYMBOL() f... |
66 67 68 69 |
.previous #endif #endif .endm |
22823ab41 EXPORT_SYMBOL() f... |
70 |
|
bbda5ec67 kbuild: simplify ... |
71 |
#if defined(CONFIG_TRIM_UNUSED_KSYMS) |
22823ab41 EXPORT_SYMBOL() f... |
72 73 74 |
#include <linux/kconfig.h> #include <generated/autoksyms.h> |
bbda5ec67 kbuild: simplify ... |
75 76 77 78 79 |
.macro __ksym_marker sym .section ".discard.ksym","a" __ksym_marker_\sym: .previous .endm |
22823ab41 EXPORT_SYMBOL() f... |
80 |
#define __EXPORT_SYMBOL(sym, val, sec) \ |
bbda5ec67 kbuild: simplify ... |
81 |
__ksym_marker sym; \ |
c0a0aba8e kconfig.h: remove... |
82 |
__cond_export_sym(sym, val, sec, __is_defined(__KSYM_##sym)) |
22823ab41 EXPORT_SYMBOL() f... |
83 84 85 86 87 88 89 90 91 92 93 94 |
#define __cond_export_sym(sym, val, sec, conf) \ ___cond_export_sym(sym, val, sec, conf) #define ___cond_export_sym(sym, val, sec, enabled) \ __cond_export_sym_##enabled(sym, val, sec) #define __cond_export_sym_1(sym, val, sec) ___EXPORT_SYMBOL sym, val, sec #define __cond_export_sym_0(sym, val, sec) /* nothing */ #else #define __EXPORT_SYMBOL(sym, val, sec) ___EXPORT_SYMBOL sym, val, sec #endif #define EXPORT_SYMBOL(name) \ |
94e58e0ac export.h: remove ... |
95 |
__EXPORT_SYMBOL(name, KSYM_FUNC(name),) |
22823ab41 EXPORT_SYMBOL() f... |
96 |
#define EXPORT_SYMBOL_GPL(name) \ |
94e58e0ac export.h: remove ... |
97 |
__EXPORT_SYMBOL(name, KSYM_FUNC(name), _gpl) |
22823ab41 EXPORT_SYMBOL() f... |
98 |
#define EXPORT_DATA_SYMBOL(name) \ |
94e58e0ac export.h: remove ... |
99 |
__EXPORT_SYMBOL(name, name,) |
22823ab41 EXPORT_SYMBOL() f... |
100 |
#define EXPORT_DATA_SYMBOL_GPL(name) \ |
94e58e0ac export.h: remove ... |
101 |
__EXPORT_SYMBOL(name, name,_gpl) |
22823ab41 EXPORT_SYMBOL() f... |
102 103 |
#endif |