x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
[linux/fpc-iii.git] / arch / um / os-Linux / user_syms.c
blobdb4a034aeee1ddc41cde5d5213627e68beed0369
1 #include <linux/types.h>
2 #include <linux/module.h>
4 /* Some of this are builtin function (some are not but could in the future),
5 * so I *must* declare good prototypes for them and then EXPORT them.
6 * The kernel code uses the macro defined by include/linux/string.h,
7 * so I undef macros; the userspace code does not include that and I
8 * add an EXPORT for the glibc one.
9 */
11 #undef strlen
12 #undef strstr
13 #undef memcpy
14 #undef memset
16 extern size_t strlen(const char *);
17 extern void *memmove(void *, const void *, size_t);
18 extern void *memset(void *, int, size_t);
19 extern int printf(const char *, ...);
21 /* If it's not defined, the export is included in lib/string.c.*/
22 #ifdef __HAVE_ARCH_STRSTR
23 EXPORT_SYMBOL(strstr);
24 #endif
26 #ifndef __x86_64__
27 extern void *memcpy(void *, const void *, size_t);
28 EXPORT_SYMBOL(memcpy);
29 #endif
31 EXPORT_SYMBOL(memmove);
32 EXPORT_SYMBOL(memset);
33 EXPORT_SYMBOL(printf);
35 /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms.
36 * However, the modules will use the CRC defined *here*, no matter if it is
37 * good; so the versions of these symbols will always match
39 #define EXPORT_SYMBOL_PROTO(sym) \
40 int sym(void); \
41 EXPORT_SYMBOL(sym);
43 extern void readdir64(void) __attribute__((weak));
44 EXPORT_SYMBOL(readdir64);
45 extern void truncate64(void) __attribute__((weak));
46 EXPORT_SYMBOL(truncate64);
48 #ifdef CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA
49 EXPORT_SYMBOL(vsyscall_ehdr);
50 EXPORT_SYMBOL(vsyscall_end);
51 #endif
53 EXPORT_SYMBOL_PROTO(__errno_location);
55 EXPORT_SYMBOL_PROTO(access);
56 EXPORT_SYMBOL_PROTO(open);
57 EXPORT_SYMBOL_PROTO(open64);
58 EXPORT_SYMBOL_PROTO(close);
59 EXPORT_SYMBOL_PROTO(read);
60 EXPORT_SYMBOL_PROTO(write);
61 EXPORT_SYMBOL_PROTO(dup2);
62 EXPORT_SYMBOL_PROTO(__xstat);
63 EXPORT_SYMBOL_PROTO(__lxstat);
64 EXPORT_SYMBOL_PROTO(__lxstat64);
65 EXPORT_SYMBOL_PROTO(__fxstat64);
66 EXPORT_SYMBOL_PROTO(lseek);
67 EXPORT_SYMBOL_PROTO(lseek64);
68 EXPORT_SYMBOL_PROTO(chown);
69 EXPORT_SYMBOL_PROTO(fchown);
70 EXPORT_SYMBOL_PROTO(truncate);
71 EXPORT_SYMBOL_PROTO(ftruncate64);
72 EXPORT_SYMBOL_PROTO(utime);
73 EXPORT_SYMBOL_PROTO(utimes);
74 EXPORT_SYMBOL_PROTO(futimes);
75 EXPORT_SYMBOL_PROTO(chmod);
76 EXPORT_SYMBOL_PROTO(fchmod);
77 EXPORT_SYMBOL_PROTO(rename);
78 EXPORT_SYMBOL_PROTO(__xmknod);
80 EXPORT_SYMBOL_PROTO(symlink);
81 EXPORT_SYMBOL_PROTO(link);
82 EXPORT_SYMBOL_PROTO(unlink);
83 EXPORT_SYMBOL_PROTO(readlink);
85 EXPORT_SYMBOL_PROTO(mkdir);
86 EXPORT_SYMBOL_PROTO(rmdir);
87 EXPORT_SYMBOL_PROTO(opendir);
88 EXPORT_SYMBOL_PROTO(readdir);
89 EXPORT_SYMBOL_PROTO(closedir);
90 EXPORT_SYMBOL_PROTO(seekdir);
91 EXPORT_SYMBOL_PROTO(telldir);
93 EXPORT_SYMBOL_PROTO(ioctl);
95 EXPORT_SYMBOL_PROTO(pread64);
96 EXPORT_SYMBOL_PROTO(pwrite64);
98 EXPORT_SYMBOL_PROTO(statfs);
99 EXPORT_SYMBOL_PROTO(statfs64);
101 EXPORT_SYMBOL_PROTO(getuid);
103 EXPORT_SYMBOL_PROTO(fsync);
104 EXPORT_SYMBOL_PROTO(fdatasync);
106 EXPORT_SYMBOL_PROTO(lstat64);
107 EXPORT_SYMBOL_PROTO(fstat64);
108 EXPORT_SYMBOL_PROTO(mknod);
110 /* Export symbols used by GCC for the stack protector. */
111 extern void __stack_smash_handler(void *) __attribute__((weak));
112 EXPORT_SYMBOL(__stack_smash_handler);
114 extern long __guard __attribute__((weak));
115 EXPORT_SYMBOL(__guard);
117 #ifdef _FORTIFY_SOURCE
118 extern int __sprintf_chk(char *str, int flag, size_t strlen, const char *format);
119 EXPORT_SYMBOL(__sprintf_chk);
120 #endif