~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/linkage.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/linkage.h (Version linux-6.12-rc7) and /include/linux/linkage.h (Version linux-5.16.20)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _LINUX_LINKAGE_H                            2 #ifndef _LINUX_LINKAGE_H
  3 #define _LINUX_LINKAGE_H                            3 #define _LINUX_LINKAGE_H
  4                                                     4 
  5 #include <linux/compiler_types.h>                   5 #include <linux/compiler_types.h>
  6 #include <linux/stringify.h>                        6 #include <linux/stringify.h>
  7 #include <linux/export.h>                           7 #include <linux/export.h>
  8 #include <asm/linkage.h>                            8 #include <asm/linkage.h>
  9                                                     9 
 10 /* Some toolchains use other characters (e.g.      10 /* Some toolchains use other characters (e.g. '`') to mark new line in macro */
 11 #ifndef ASM_NL                                     11 #ifndef ASM_NL
 12 #define ASM_NL           ;                         12 #define ASM_NL           ;
 13 #endif                                             13 #endif
 14                                                    14 
 15 #ifdef __cplusplus                                 15 #ifdef __cplusplus
 16 #define CPP_ASMLINKAGE extern "C"                  16 #define CPP_ASMLINKAGE extern "C"
 17 #else                                              17 #else
 18 #define CPP_ASMLINKAGE                             18 #define CPP_ASMLINKAGE
 19 #endif                                             19 #endif
 20                                                    20 
 21 #ifndef asmlinkage                                 21 #ifndef asmlinkage
 22 #define asmlinkage CPP_ASMLINKAGE                  22 #define asmlinkage CPP_ASMLINKAGE
 23 #endif                                             23 #endif
 24                                                    24 
 25 #ifndef cond_syscall                               25 #ifndef cond_syscall
 26 #define cond_syscall(x) asm(                       26 #define cond_syscall(x) asm(                            \
 27         ".weak " __stringify(x) "\n\t"             27         ".weak " __stringify(x) "\n\t"                  \
 28         ".set  " __stringify(x) ","                28         ".set  " __stringify(x) ","                     \
 29                  __stringify(sys_ni_syscall))      29                  __stringify(sys_ni_syscall))
 30 #endif                                             30 #endif
 31                                                    31 
 32 #ifndef SYSCALL_ALIAS                              32 #ifndef SYSCALL_ALIAS
 33 #define SYSCALL_ALIAS(alias, name) asm(            33 #define SYSCALL_ALIAS(alias, name) asm(                 \
 34         ".globl " __stringify(alias) "\n\t"        34         ".globl " __stringify(alias) "\n\t"             \
 35         ".set   " __stringify(alias) ","           35         ".set   " __stringify(alias) ","                \
 36                   __stringify(name))               36                   __stringify(name))
 37 #endif                                             37 #endif
 38                                                    38 
 39 #define __page_aligned_data     __section(".da     39 #define __page_aligned_data     __section(".data..page_aligned") __aligned(PAGE_SIZE)
 40 #define __page_aligned_bss      __section(".bs     40 #define __page_aligned_bss      __section(".bss..page_aligned") __aligned(PAGE_SIZE)
 41                                                    41 
 42 /*                                                 42 /*
 43  * For assembly routines.                          43  * For assembly routines.
 44  *                                                 44  *
 45  * Note when using these that you must specify     45  * Note when using these that you must specify the appropriate
 46  * alignment directives yourself                   46  * alignment directives yourself
 47  */                                                47  */
 48 #define __PAGE_ALIGNED_DATA     .section ".dat     48 #define __PAGE_ALIGNED_DATA     .section ".data..page_aligned", "aw"
 49 #define __PAGE_ALIGNED_BSS      .section ".bss     49 #define __PAGE_ALIGNED_BSS      .section ".bss..page_aligned", "aw"
 50                                                    50 
 51 /*                                                 51 /*
 52  * This is used by architectures to keep argum     52  * This is used by architectures to keep arguments on the stack
 53  * untouched by the compiler by keeping them l     53  * untouched by the compiler by keeping them live until the end.
 54  * The argument stack may be owned by the asse     54  * The argument stack may be owned by the assembly-language
 55  * caller, not the callee, and gcc doesn't alw     55  * caller, not the callee, and gcc doesn't always understand
 56  * that.                                           56  * that.
 57  *                                                 57  *
 58  * We have the return value, and a maximum of      58  * We have the return value, and a maximum of six arguments.
 59  *                                                 59  *
 60  * This should always be followed by a "return     60  * This should always be followed by a "return ret" for the
 61  * protection to work (ie no more work that th     61  * protection to work (ie no more work that the compiler might
 62  * end up needing stack temporaries for).          62  * end up needing stack temporaries for).
 63  */                                                63  */
 64 /* Assembly files may be compiled with -tradit     64 /* Assembly files may be compiled with -traditional .. */
 65 #ifndef __ASSEMBLY__                               65 #ifndef __ASSEMBLY__
 66 #ifndef asmlinkage_protect                         66 #ifndef asmlinkage_protect
 67 # define asmlinkage_protect(n, ret, args...)       67 # define asmlinkage_protect(n, ret, args...)    do { } while (0)
 68 #endif                                             68 #endif
 69 #endif                                             69 #endif
 70                                                    70 
 71 #ifndef __ALIGN                                    71 #ifndef __ALIGN
 72 #define __ALIGN                 .balign CONFIG !!  72 #define __ALIGN         .align 4,0x90
 73 #define __ALIGN_STR             __stringify(__ !!  73 #define __ALIGN_STR     ".align 4,0x90"
 74 #endif                                             74 #endif
 75                                                    75 
 76 #ifdef __ASSEMBLY__                                76 #ifdef __ASSEMBLY__
 77                                                    77 
 78 /* SYM_T_FUNC -- type used by assembler to mar     78 /* SYM_T_FUNC -- type used by assembler to mark functions */
 79 #ifndef SYM_T_FUNC                                 79 #ifndef SYM_T_FUNC
 80 #define SYM_T_FUNC                                 80 #define SYM_T_FUNC                              STT_FUNC
 81 #endif                                             81 #endif
 82                                                    82 
 83 /* SYM_T_OBJECT -- type used by assembler to m     83 /* SYM_T_OBJECT -- type used by assembler to mark data */
 84 #ifndef SYM_T_OBJECT                               84 #ifndef SYM_T_OBJECT
 85 #define SYM_T_OBJECT                               85 #define SYM_T_OBJECT                            STT_OBJECT
 86 #endif                                             86 #endif
 87                                                    87 
 88 /* SYM_T_NONE -- type used by assembler to mar     88 /* SYM_T_NONE -- type used by assembler to mark entries of unknown type */
 89 #ifndef SYM_T_NONE                                 89 #ifndef SYM_T_NONE
 90 #define SYM_T_NONE                                 90 #define SYM_T_NONE                              STT_NOTYPE
 91 #endif                                             91 #endif
 92                                                    92 
 93 /* SYM_A_* -- align the symbol? */                 93 /* SYM_A_* -- align the symbol? */
 94 #define SYM_A_ALIGN                                94 #define SYM_A_ALIGN                             ALIGN
 95 #define SYM_A_NONE                                 95 #define SYM_A_NONE                              /* nothing */
 96                                                    96 
 97 /* SYM_L_* -- linkage of symbols */                97 /* SYM_L_* -- linkage of symbols */
 98 #define SYM_L_GLOBAL(name)                         98 #define SYM_L_GLOBAL(name)                      .globl name
 99 #define SYM_L_WEAK(name)                           99 #define SYM_L_WEAK(name)                        .weak name
100 #define SYM_L_LOCAL(name)                         100 #define SYM_L_LOCAL(name)                       /* nothing */
101                                                   101 
102 #ifndef LINKER_SCRIPT                             102 #ifndef LINKER_SCRIPT
103 #define ALIGN __ALIGN                             103 #define ALIGN __ALIGN
104 #define ALIGN_STR __ALIGN_STR                     104 #define ALIGN_STR __ALIGN_STR
105                                                   105 
106 /* === DEPRECATED annotations === */              106 /* === DEPRECATED annotations === */
107                                                   107 
108 #ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS           108 #ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS
109 #ifndef GLOBAL                                    109 #ifndef GLOBAL
110 /* deprecated, use SYM_DATA*, SYM_ENTRY, or si    110 /* deprecated, use SYM_DATA*, SYM_ENTRY, or similar */
111 #define GLOBAL(name) \                            111 #define GLOBAL(name) \
112         .globl name ASM_NL \                      112         .globl name ASM_NL \
113         name:                                     113         name:
114 #endif                                            114 #endif
115                                                   115 
116 #ifndef ENTRY                                     116 #ifndef ENTRY
117 /* deprecated, use SYM_FUNC_START */              117 /* deprecated, use SYM_FUNC_START */
118 #define ENTRY(name) \                             118 #define ENTRY(name) \
119         SYM_FUNC_START(name)                      119         SYM_FUNC_START(name)
120 #endif                                            120 #endif
121 #endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */      121 #endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */
122 #endif /* LINKER_SCRIPT */                        122 #endif /* LINKER_SCRIPT */
123                                                   123 
124 #ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS           124 #ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS
125 #ifndef WEAK                                      125 #ifndef WEAK
126 /* deprecated, use SYM_FUNC_START_WEAK* */        126 /* deprecated, use SYM_FUNC_START_WEAK* */
127 #define WEAK(name)         \                      127 #define WEAK(name)         \
128         SYM_FUNC_START_WEAK(name)                 128         SYM_FUNC_START_WEAK(name)
129 #endif                                            129 #endif
130                                                   130 
131 #ifndef END                                       131 #ifndef END
132 /* deprecated, use SYM_FUNC_END, SYM_DATA_END,    132 /* deprecated, use SYM_FUNC_END, SYM_DATA_END, or SYM_END */
133 #define END(name) \                               133 #define END(name) \
134         .size name, .-name                        134         .size name, .-name
135 #endif                                            135 #endif
136                                                   136 
137 /* If symbol 'name' is treated as a subroutine    137 /* If symbol 'name' is treated as a subroutine (gets called, and returns)
138  * then please use ENDPROC to mark 'name' as S    138  * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
139  * static analysis tools such as stack depth a    139  * static analysis tools such as stack depth analyzer.
140  */                                               140  */
141 #ifndef ENDPROC                                   141 #ifndef ENDPROC
142 /* deprecated, use SYM_FUNC_END */                142 /* deprecated, use SYM_FUNC_END */
143 #define ENDPROC(name) \                           143 #define ENDPROC(name) \
144         SYM_FUNC_END(name)                        144         SYM_FUNC_END(name)
145 #endif                                            145 #endif
146 #endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */      146 #endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */
147                                                   147 
148 /* === generic annotations === */                 148 /* === generic annotations === */
149                                                   149 
150 /* SYM_ENTRY -- use only if you have to for no    150 /* SYM_ENTRY -- use only if you have to for non-paired symbols */
151 #ifndef SYM_ENTRY                                 151 #ifndef SYM_ENTRY
152 #define SYM_ENTRY(name, linkage, align...)        152 #define SYM_ENTRY(name, linkage, align...)              \
153         linkage(name) ASM_NL                      153         linkage(name) ASM_NL                            \
154         align ASM_NL                              154         align ASM_NL                                    \
155         name:                                     155         name:
156 #endif                                            156 #endif
157                                                   157 
158 /* SYM_START -- use only if you have to */        158 /* SYM_START -- use only if you have to */
159 #ifndef SYM_START                                 159 #ifndef SYM_START
160 #define SYM_START(name, linkage, align...)        160 #define SYM_START(name, linkage, align...)              \
161         SYM_ENTRY(name, linkage, align)           161         SYM_ENTRY(name, linkage, align)
162 #endif                                            162 #endif
163                                                   163 
164 /* SYM_END -- use only if you have to */          164 /* SYM_END -- use only if you have to */
165 #ifndef SYM_END                                   165 #ifndef SYM_END
166 #define SYM_END(name, sym_type)                   166 #define SYM_END(name, sym_type)                         \
167         .type name sym_type ASM_NL                167         .type name sym_type ASM_NL                      \
168         .set .L__sym_size_##name, .-name ASM_N !! 168         .size name, .-name
169         .size name, .L__sym_size_##name        << 
170 #endif                                         << 
171                                                << 
172 /* SYM_ALIAS -- use only if you have to */     << 
173 #ifndef SYM_ALIAS                              << 
174 #define SYM_ALIAS(alias, name, linkage)        << 
175         linkage(alias) ASM_NL                  << 
176         .set alias, name ASM_NL                << 
177 #endif                                            169 #endif
178                                                   170 
179 /* === code annotations === */                    171 /* === code annotations === */
180                                                   172 
181 /*                                                173 /*
182  * FUNC -- C-like functions (proper stack fram    174  * FUNC -- C-like functions (proper stack frame etc.)
183  * CODE -- non-C code (e.g. irq handlers with     175  * CODE -- non-C code (e.g. irq handlers with different, special stack etc.)
184  *                                                176  *
185  * Objtool validates stack for FUNC, but not f    177  * Objtool validates stack for FUNC, but not for CODE.
186  * Objtool generates debug info for both FUNC     178  * Objtool generates debug info for both FUNC & CODE, but needs special
187  * annotations for each CODE's start (to descr    179  * annotations for each CODE's start (to describe the actual stack frame).
188  *                                                180  *
189  * Objtool requires that all code must be cont    181  * Objtool requires that all code must be contained in an ELF symbol. Symbol
190  * names that have a  .L prefix do not emit sy    182  * names that have a  .L prefix do not emit symbol table entries. .L
191  * prefixed symbols can be used within a code     183  * prefixed symbols can be used within a code region, but should be avoided for
192  * denoting a range of code via ``SYM_*_START/    184  * denoting a range of code via ``SYM_*_START/END`` annotations.
193  *                                                185  *
194  * ALIAS -- does not generate debug info -- th    186  * ALIAS -- does not generate debug info -- the aliased function will
195  */                                               187  */
196                                                   188 
197 /* SYM_INNER_LABEL_ALIGN -- only for labels in    189 /* SYM_INNER_LABEL_ALIGN -- only for labels in the middle of code */
198 #ifndef SYM_INNER_LABEL_ALIGN                     190 #ifndef SYM_INNER_LABEL_ALIGN
199 #define SYM_INNER_LABEL_ALIGN(name, linkage)      191 #define SYM_INNER_LABEL_ALIGN(name, linkage)    \
200         .type name SYM_T_NONE ASM_NL              192         .type name SYM_T_NONE ASM_NL                    \
201         SYM_ENTRY(name, linkage, SYM_A_ALIGN)     193         SYM_ENTRY(name, linkage, SYM_A_ALIGN)
202 #endif                                            194 #endif
203                                                   195 
204 /* SYM_INNER_LABEL -- only for labels in the m    196 /* SYM_INNER_LABEL -- only for labels in the middle of code */
205 #ifndef SYM_INNER_LABEL                           197 #ifndef SYM_INNER_LABEL
206 #define SYM_INNER_LABEL(name, linkage)            198 #define SYM_INNER_LABEL(name, linkage)          \
207         .type name SYM_T_NONE ASM_NL              199         .type name SYM_T_NONE ASM_NL                    \
208         SYM_ENTRY(name, linkage, SYM_A_NONE)      200         SYM_ENTRY(name, linkage, SYM_A_NONE)
209 #endif                                            201 #endif
210                                                   202 
                                                   >> 203 /*
                                                   >> 204  * SYM_FUNC_START_LOCAL_ALIAS -- use where there are two local names for one
                                                   >> 205  * function
                                                   >> 206  */
                                                   >> 207 #ifndef SYM_FUNC_START_LOCAL_ALIAS
                                                   >> 208 #define SYM_FUNC_START_LOCAL_ALIAS(name)                \
                                                   >> 209         SYM_START(name, SYM_L_LOCAL, SYM_A_ALIGN)
                                                   >> 210 #endif
                                                   >> 211 
                                                   >> 212 /*
                                                   >> 213  * SYM_FUNC_START_ALIAS -- use where there are two global names for one
                                                   >> 214  * function
                                                   >> 215  */
                                                   >> 216 #ifndef SYM_FUNC_START_ALIAS
                                                   >> 217 #define SYM_FUNC_START_ALIAS(name)                      \
                                                   >> 218         SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)
                                                   >> 219 #endif
                                                   >> 220 
211 /* SYM_FUNC_START -- use for global functions     221 /* SYM_FUNC_START -- use for global functions */
212 #ifndef SYM_FUNC_START                            222 #ifndef SYM_FUNC_START
                                                   >> 223 /*
                                                   >> 224  * The same as SYM_FUNC_START_ALIAS, but we will need to distinguish these two
                                                   >> 225  * later.
                                                   >> 226  */
213 #define SYM_FUNC_START(name)                      227 #define SYM_FUNC_START(name)                            \
214         SYM_START(name, SYM_L_GLOBAL, SYM_A_AL    228         SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)
215 #endif                                            229 #endif
216                                                   230 
217 /* SYM_FUNC_START_NOALIGN -- use for global fu    231 /* SYM_FUNC_START_NOALIGN -- use for global functions, w/o alignment */
218 #ifndef SYM_FUNC_START_NOALIGN                    232 #ifndef SYM_FUNC_START_NOALIGN
219 #define SYM_FUNC_START_NOALIGN(name)              233 #define SYM_FUNC_START_NOALIGN(name)                    \
220         SYM_START(name, SYM_L_GLOBAL, SYM_A_NO    234         SYM_START(name, SYM_L_GLOBAL, SYM_A_NONE)
221 #endif                                            235 #endif
222                                                   236 
223 /* SYM_FUNC_START_LOCAL -- use for local funct    237 /* SYM_FUNC_START_LOCAL -- use for local functions */
224 #ifndef SYM_FUNC_START_LOCAL                      238 #ifndef SYM_FUNC_START_LOCAL
                                                   >> 239 /* the same as SYM_FUNC_START_LOCAL_ALIAS, see comment near SYM_FUNC_START */
225 #define SYM_FUNC_START_LOCAL(name)                240 #define SYM_FUNC_START_LOCAL(name)                      \
226         SYM_START(name, SYM_L_LOCAL, SYM_A_ALI    241         SYM_START(name, SYM_L_LOCAL, SYM_A_ALIGN)
227 #endif                                            242 #endif
228                                                   243 
229 /* SYM_FUNC_START_LOCAL_NOALIGN -- use for loc    244 /* SYM_FUNC_START_LOCAL_NOALIGN -- use for local functions, w/o alignment */
230 #ifndef SYM_FUNC_START_LOCAL_NOALIGN              245 #ifndef SYM_FUNC_START_LOCAL_NOALIGN
231 #define SYM_FUNC_START_LOCAL_NOALIGN(name)        246 #define SYM_FUNC_START_LOCAL_NOALIGN(name)              \
232         SYM_START(name, SYM_L_LOCAL, SYM_A_NON    247         SYM_START(name, SYM_L_LOCAL, SYM_A_NONE)
233 #endif                                            248 #endif
234                                                   249 
235 /* SYM_FUNC_START_WEAK -- use for weak functio    250 /* SYM_FUNC_START_WEAK -- use for weak functions */
236 #ifndef SYM_FUNC_START_WEAK                       251 #ifndef SYM_FUNC_START_WEAK
237 #define SYM_FUNC_START_WEAK(name)                 252 #define SYM_FUNC_START_WEAK(name)                       \
238         SYM_START(name, SYM_L_WEAK, SYM_A_ALIG    253         SYM_START(name, SYM_L_WEAK, SYM_A_ALIGN)
239 #endif                                            254 #endif
240                                                   255 
241 /* SYM_FUNC_START_WEAK_NOALIGN -- use for weak    256 /* SYM_FUNC_START_WEAK_NOALIGN -- use for weak functions, w/o alignment */
242 #ifndef SYM_FUNC_START_WEAK_NOALIGN               257 #ifndef SYM_FUNC_START_WEAK_NOALIGN
243 #define SYM_FUNC_START_WEAK_NOALIGN(name)         258 #define SYM_FUNC_START_WEAK_NOALIGN(name)               \
244         SYM_START(name, SYM_L_WEAK, SYM_A_NONE    259         SYM_START(name, SYM_L_WEAK, SYM_A_NONE)
245 #endif                                            260 #endif
246                                                   261 
                                                   >> 262 /* SYM_FUNC_END_ALIAS -- the end of LOCAL_ALIASed or ALIASed function */
                                                   >> 263 #ifndef SYM_FUNC_END_ALIAS
                                                   >> 264 #define SYM_FUNC_END_ALIAS(name)                        \
                                                   >> 265         SYM_END(name, SYM_T_FUNC)
                                                   >> 266 #endif
                                                   >> 267 
247 /*                                                268 /*
248  * SYM_FUNC_END -- the end of SYM_FUNC_START_L    269  * SYM_FUNC_END -- the end of SYM_FUNC_START_LOCAL, SYM_FUNC_START,
249  * SYM_FUNC_START_WEAK, ...                       270  * SYM_FUNC_START_WEAK, ...
250  */                                               271  */
251 #ifndef SYM_FUNC_END                              272 #ifndef SYM_FUNC_END
                                                   >> 273 /* the same as SYM_FUNC_END_ALIAS, see comment near SYM_FUNC_START */
252 #define SYM_FUNC_END(name)                        274 #define SYM_FUNC_END(name)                              \
253         SYM_END(name, SYM_T_FUNC)                 275         SYM_END(name, SYM_T_FUNC)
254 #endif                                         << 
255                                                << 
256 /*                                             << 
257  * SYM_FUNC_ALIAS -- define a global alias for << 
258  */                                            << 
259 #ifndef SYM_FUNC_ALIAS                         << 
260 #define SYM_FUNC_ALIAS(alias, name)            << 
261         SYM_ALIAS(alias, name, SYM_L_GLOBAL)   << 
262 #endif                                         << 
263                                                << 
264 /*                                             << 
265  * SYM_FUNC_ALIAS_LOCAL -- define a local alia << 
266  */                                            << 
267 #ifndef SYM_FUNC_ALIAS_LOCAL                   << 
268 #define SYM_FUNC_ALIAS_LOCAL(alias, name)      << 
269         SYM_ALIAS(alias, name, SYM_L_LOCAL)    << 
270 #endif                                         << 
271                                                << 
272 /*                                             << 
273  * SYM_FUNC_ALIAS_WEAK -- define a weak global << 
274  */                                            << 
275 #ifndef SYM_FUNC_ALIAS_WEAK                    << 
276 #define SYM_FUNC_ALIAS_WEAK(alias, name)       << 
277         SYM_ALIAS(alias, name, SYM_L_WEAK)     << 
278 #endif                                            276 #endif
279                                                   277 
280 /* SYM_CODE_START -- use for non-C (special) f    278 /* SYM_CODE_START -- use for non-C (special) functions */
281 #ifndef SYM_CODE_START                            279 #ifndef SYM_CODE_START
282 #define SYM_CODE_START(name)                      280 #define SYM_CODE_START(name)                            \
283         SYM_START(name, SYM_L_GLOBAL, SYM_A_AL    281         SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)
284 #endif                                            282 #endif
285                                                   283 
286 /* SYM_CODE_START_NOALIGN -- use for non-C (sp    284 /* SYM_CODE_START_NOALIGN -- use for non-C (special) functions, w/o alignment */
287 #ifndef SYM_CODE_START_NOALIGN                    285 #ifndef SYM_CODE_START_NOALIGN
288 #define SYM_CODE_START_NOALIGN(name)              286 #define SYM_CODE_START_NOALIGN(name)                    \
289         SYM_START(name, SYM_L_GLOBAL, SYM_A_NO    287         SYM_START(name, SYM_L_GLOBAL, SYM_A_NONE)
290 #endif                                            288 #endif
291                                                   289 
292 /* SYM_CODE_START_LOCAL -- use for local non-C    290 /* SYM_CODE_START_LOCAL -- use for local non-C (special) functions */
293 #ifndef SYM_CODE_START_LOCAL                      291 #ifndef SYM_CODE_START_LOCAL
294 #define SYM_CODE_START_LOCAL(name)                292 #define SYM_CODE_START_LOCAL(name)                      \
295         SYM_START(name, SYM_L_LOCAL, SYM_A_ALI    293         SYM_START(name, SYM_L_LOCAL, SYM_A_ALIGN)
296 #endif                                            294 #endif
297                                                   295 
298 /*                                                296 /*
299  * SYM_CODE_START_LOCAL_NOALIGN -- use for loc    297  * SYM_CODE_START_LOCAL_NOALIGN -- use for local non-C (special) functions,
300  * w/o alignment                                  298  * w/o alignment
301  */                                               299  */
302 #ifndef SYM_CODE_START_LOCAL_NOALIGN              300 #ifndef SYM_CODE_START_LOCAL_NOALIGN
303 #define SYM_CODE_START_LOCAL_NOALIGN(name)        301 #define SYM_CODE_START_LOCAL_NOALIGN(name)              \
304         SYM_START(name, SYM_L_LOCAL, SYM_A_NON    302         SYM_START(name, SYM_L_LOCAL, SYM_A_NONE)
305 #endif                                            303 #endif
306                                                   304 
307 /* SYM_CODE_END -- the end of SYM_CODE_START_L    305 /* SYM_CODE_END -- the end of SYM_CODE_START_LOCAL, SYM_CODE_START, ... */
308 #ifndef SYM_CODE_END                              306 #ifndef SYM_CODE_END
309 #define SYM_CODE_END(name)                        307 #define SYM_CODE_END(name)                              \
310         SYM_END(name, SYM_T_NONE)                 308         SYM_END(name, SYM_T_NONE)
311 #endif                                            309 #endif
312                                                   310 
313 /* === data annotations === */                    311 /* === data annotations === */
314                                                   312 
315 /* SYM_DATA_START -- global data symbol */        313 /* SYM_DATA_START -- global data symbol */
316 #ifndef SYM_DATA_START                            314 #ifndef SYM_DATA_START
317 #define SYM_DATA_START(name)                      315 #define SYM_DATA_START(name)                            \
318         SYM_START(name, SYM_L_GLOBAL, SYM_A_NO    316         SYM_START(name, SYM_L_GLOBAL, SYM_A_NONE)
319 #endif                                            317 #endif
320                                                   318 
321 /* SYM_DATA_START -- local data symbol */         319 /* SYM_DATA_START -- local data symbol */
322 #ifndef SYM_DATA_START_LOCAL                      320 #ifndef SYM_DATA_START_LOCAL
323 #define SYM_DATA_START_LOCAL(name)                321 #define SYM_DATA_START_LOCAL(name)                      \
324         SYM_START(name, SYM_L_LOCAL, SYM_A_NON    322         SYM_START(name, SYM_L_LOCAL, SYM_A_NONE)
325 #endif                                            323 #endif
326                                                   324 
327 /* SYM_DATA_END -- the end of SYM_DATA_START s    325 /* SYM_DATA_END -- the end of SYM_DATA_START symbol */
328 #ifndef SYM_DATA_END                              326 #ifndef SYM_DATA_END
329 #define SYM_DATA_END(name)                        327 #define SYM_DATA_END(name)                              \
330         SYM_END(name, SYM_T_OBJECT)               328         SYM_END(name, SYM_T_OBJECT)
331 #endif                                            329 #endif
332                                                   330 
333 /* SYM_DATA_END_LABEL -- the labeled end of SY    331 /* SYM_DATA_END_LABEL -- the labeled end of SYM_DATA_START symbol */
334 #ifndef SYM_DATA_END_LABEL                        332 #ifndef SYM_DATA_END_LABEL
335 #define SYM_DATA_END_LABEL(name, linkage, labe    333 #define SYM_DATA_END_LABEL(name, linkage, label)        \
336         linkage(label) ASM_NL                     334         linkage(label) ASM_NL                           \
337         .type label SYM_T_OBJECT ASM_NL           335         .type label SYM_T_OBJECT ASM_NL                 \
338         label:                                    336         label:                                          \
339         SYM_END(name, SYM_T_OBJECT)               337         SYM_END(name, SYM_T_OBJECT)
340 #endif                                            338 #endif
341                                                   339 
342 /* SYM_DATA -- start+end wrapper around simple    340 /* SYM_DATA -- start+end wrapper around simple global data */
343 #ifndef SYM_DATA                                  341 #ifndef SYM_DATA
344 #define SYM_DATA(name, data...)                   342 #define SYM_DATA(name, data...)                         \
345         SYM_DATA_START(name) ASM_NL               343         SYM_DATA_START(name) ASM_NL                             \
346         data ASM_NL                               344         data ASM_NL                                             \
347         SYM_DATA_END(name)                        345         SYM_DATA_END(name)
348 #endif                                            346 #endif
349                                                   347 
350 /* SYM_DATA_LOCAL -- start+end wrapper around     348 /* SYM_DATA_LOCAL -- start+end wrapper around simple local data */
351 #ifndef SYM_DATA_LOCAL                            349 #ifndef SYM_DATA_LOCAL
352 #define SYM_DATA_LOCAL(name, data...)             350 #define SYM_DATA_LOCAL(name, data...)                   \
353         SYM_DATA_START_LOCAL(name) ASM_NL         351         SYM_DATA_START_LOCAL(name) ASM_NL                       \
354         data ASM_NL                               352         data ASM_NL                                             \
355         SYM_DATA_END(name)                        353         SYM_DATA_END(name)
356 #endif                                            354 #endif
357                                                   355 
358 #endif /* __ASSEMBLY__ */                         356 #endif /* __ASSEMBLY__ */
359                                                   357 
360 #endif /* _LINUX_LINKAGE_H */                     358 #endif /* _LINUX_LINKAGE_H */
361                                                   359 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php