1 #ifndef _LINUX_LINKAGE_H
2 #define _LINUX_LINKAGE_H
3
4 #ifdef __cplusplus
5 #define asmlinkage extern "C"
6 #else
7 #define asmlinkage
8 #endif
9
10 #ifdef __ELF__
11 #define SYMBOL_NAME_STR(X) #X
12 #define SYMBOL_NAME(X) X
13 #ifdef __STDC__
14 #define SYMBOL_NAME_LABEL(X) X##:
15 #else
16 #define SYMBOL_NAME_LABEL(X) X:
17 #endif
18 #else
19 #define SYMBOL_NAME_STR(X) "_"#X
20 #ifdef __STDC__
21 #define SYMBOL_NAME(X) _##X
22 #define SYMBOL_NAME_LABEL(X) _##X##:
23 #else
24 #define SYMBOL_NAME(X) _X
25 #define SYMBOL_NAME_LABEL(X) _X:
26 #endif
27 #endif
28
29 #if !defined(__i486__) && !defined(__i586__)
30 #ifdef __ELF__
31 #define __ALIGN .align 4,0x90
32 #define __ALIGN_STR ".align 4,0x90"
33 #else
34 #define __ALIGN .align 2,0x90
35 #define __ALIGN_STR ".align 2,0x90"
36 #endif
37 #else
38 #ifdef __ELF__
39 #define __ALIGN .align 16,0x90
40 #define __ALIGN_STR ".align 16,0x90"
41 #else
42 #define __ALIGN .align 4,0x90
43 #define __ALIGN_STR ".align 4,0x90"
44 #endif
45 #endif
46
47 #ifdef __ASSEMBLY__
48
49 #define ALIGN __ALIGN
50 #define ALIGN_STRING __ALIGN_STRING
51
52 #define ENTRY(name) \
53 .globl SYMBOL_NAME(name); \
54 ALIGN; \
55 SYMBOL_NAME_LABEL(name)
56
57 #endif
58
59 #endif