uml: export hostfs symbols
[linux-2.6-block.git] / arch / um / os-Linux / user_syms.c
CommitLineData
1da177e4
LT
1#include "linux/types.h"
2#include "linux/module.h"
3
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
e8234483
JD
8 * add an EXPORT for the glibc one.
9 */
1da177e4
LT
10
11#undef strlen
12#undef strstr
13#undef memcpy
14#undef memset
15
16extern size_t strlen(const char *);
17extern void *memcpy(void *, const void *, size_t);
18extern void *memmove(void *, const void *, size_t);
19extern void *memset(void *, int, size_t);
20extern int printf(const char *, ...);
21
7c45ad16
PBG
22/* If they're not defined, the export is included in lib/string.c.*/
23#ifdef __HAVE_ARCH_STRLEN
1da177e4 24EXPORT_SYMBOL(strlen);
7c45ad16
PBG
25#endif
26#ifdef __HAVE_ARCH_STRSTR
27EXPORT_SYMBOL(strstr);
28#endif
29
1da177e4
LT
30EXPORT_SYMBOL(memcpy);
31EXPORT_SYMBOL(memmove);
32EXPORT_SYMBOL(memset);
33EXPORT_SYMBOL(printf);
34
1da177e4
LT
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
38 */
39#define EXPORT_SYMBOL_PROTO(sym) \
40 int sym(void); \
41 EXPORT_SYMBOL(sym);
42
74433c0f
PBG
43extern void readdir64(void) __attribute__((weak));
44EXPORT_SYMBOL(readdir64);
45extern void truncate64(void) __attribute__((weak));
46EXPORT_SYMBOL(truncate64);
47
1da177e4
LT
48#ifdef SUBARCH_i386
49EXPORT_SYMBOL(vsyscall_ehdr);
50EXPORT_SYMBOL(vsyscall_end);
51#endif
52
53EXPORT_SYMBOL_PROTO(__errno_location);
54
55EXPORT_SYMBOL_PROTO(access);
56EXPORT_SYMBOL_PROTO(open);
57EXPORT_SYMBOL_PROTO(open64);
58EXPORT_SYMBOL_PROTO(close);
59EXPORT_SYMBOL_PROTO(read);
60EXPORT_SYMBOL_PROTO(write);
61EXPORT_SYMBOL_PROTO(dup2);
62EXPORT_SYMBOL_PROTO(__xstat);
63EXPORT_SYMBOL_PROTO(__lxstat);
64EXPORT_SYMBOL_PROTO(__lxstat64);
e8234483 65EXPORT_SYMBOL_PROTO(__fxstat64);
1da177e4
LT
66EXPORT_SYMBOL_PROTO(lseek);
67EXPORT_SYMBOL_PROTO(lseek64);
68EXPORT_SYMBOL_PROTO(chown);
e8234483 69EXPORT_SYMBOL_PROTO(fchown);
1da177e4 70EXPORT_SYMBOL_PROTO(truncate);
e8234483 71EXPORT_SYMBOL_PROTO(ftruncate64);
1da177e4 72EXPORT_SYMBOL_PROTO(utime);
e8234483
JD
73EXPORT_SYMBOL_PROTO(utimes);
74EXPORT_SYMBOL_PROTO(futimes);
1da177e4 75EXPORT_SYMBOL_PROTO(chmod);
e8234483 76EXPORT_SYMBOL_PROTO(fchmod);
1da177e4
LT
77EXPORT_SYMBOL_PROTO(rename);
78EXPORT_SYMBOL_PROTO(__xmknod);
79
80EXPORT_SYMBOL_PROTO(symlink);
81EXPORT_SYMBOL_PROTO(link);
82EXPORT_SYMBOL_PROTO(unlink);
83EXPORT_SYMBOL_PROTO(readlink);
84
85EXPORT_SYMBOL_PROTO(mkdir);
86EXPORT_SYMBOL_PROTO(rmdir);
87EXPORT_SYMBOL_PROTO(opendir);
88EXPORT_SYMBOL_PROTO(readdir);
89EXPORT_SYMBOL_PROTO(closedir);
90EXPORT_SYMBOL_PROTO(seekdir);
91EXPORT_SYMBOL_PROTO(telldir);
92
93EXPORT_SYMBOL_PROTO(ioctl);
94
95EXPORT_SYMBOL_PROTO(pread64);
96EXPORT_SYMBOL_PROTO(pwrite64);
97
98EXPORT_SYMBOL_PROTO(statfs);
99EXPORT_SYMBOL_PROTO(statfs64);
100
101EXPORT_SYMBOL_PROTO(getuid);
102
a2d76bd8
PBG
103EXPORT_SYMBOL_PROTO(fsync);
104EXPORT_SYMBOL_PROTO(fdatasync);
105
cead61a6
PBG
106/* Export symbols used by GCC for the stack protector. */
107extern void __stack_smash_handler(void *) __attribute__((weak));
108EXPORT_SYMBOL(__stack_smash_handler);
109
110extern long __guard __attribute__((weak));
111EXPORT_SYMBOL(__guard);