xref: /linux/arch/um/os-Linux/user_syms.c (revision 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2)
1*1da177e4SLinus Torvalds #include "linux/types.h"
2*1da177e4SLinus Torvalds #include "linux/module.h"
3*1da177e4SLinus Torvalds 
4*1da177e4SLinus Torvalds /* Some of this are builtin function (some are not but could in the future),
5*1da177e4SLinus Torvalds  * so I *must* declare good prototypes for them and then EXPORT them.
6*1da177e4SLinus Torvalds  * The kernel code uses the macro defined by include/linux/string.h,
7*1da177e4SLinus Torvalds  * so I undef macros; the userspace code does not include that and I
8*1da177e4SLinus Torvalds  * add an EXPORT for the glibc one.*/
9*1da177e4SLinus Torvalds 
10*1da177e4SLinus Torvalds #undef strlen
11*1da177e4SLinus Torvalds #undef strstr
12*1da177e4SLinus Torvalds #undef memcpy
13*1da177e4SLinus Torvalds #undef memset
14*1da177e4SLinus Torvalds 
15*1da177e4SLinus Torvalds extern size_t strlen(const char *);
16*1da177e4SLinus Torvalds extern void *memcpy(void *, const void *, size_t);
17*1da177e4SLinus Torvalds extern void *memmove(void *, const void *, size_t);
18*1da177e4SLinus Torvalds extern void *memset(void *, int, size_t);
19*1da177e4SLinus Torvalds extern int printf(const char *, ...);
20*1da177e4SLinus Torvalds 
21*1da177e4SLinus Torvalds EXPORT_SYMBOL(strlen);
22*1da177e4SLinus Torvalds EXPORT_SYMBOL(memcpy);
23*1da177e4SLinus Torvalds EXPORT_SYMBOL(memmove);
24*1da177e4SLinus Torvalds EXPORT_SYMBOL(memset);
25*1da177e4SLinus Torvalds EXPORT_SYMBOL(printf);
26*1da177e4SLinus Torvalds 
27*1da177e4SLinus Torvalds EXPORT_SYMBOL(strstr);
28*1da177e4SLinus Torvalds 
29*1da177e4SLinus Torvalds /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms.
30*1da177e4SLinus Torvalds  * However, the modules will use the CRC defined *here*, no matter if it is
31*1da177e4SLinus Torvalds  * good; so the versions of these symbols will always match
32*1da177e4SLinus Torvalds  */
33*1da177e4SLinus Torvalds #define EXPORT_SYMBOL_PROTO(sym)       \
34*1da177e4SLinus Torvalds        int sym(void);                  \
35*1da177e4SLinus Torvalds        EXPORT_SYMBOL(sym);
36*1da177e4SLinus Torvalds 
37*1da177e4SLinus Torvalds #ifdef SUBARCH_i386
38*1da177e4SLinus Torvalds EXPORT_SYMBOL(vsyscall_ehdr);
39*1da177e4SLinus Torvalds EXPORT_SYMBOL(vsyscall_end);
40*1da177e4SLinus Torvalds #endif
41*1da177e4SLinus Torvalds 
42*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__errno_location);
43*1da177e4SLinus Torvalds 
44*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(access);
45*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(open);
46*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(open64);
47*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(close);
48*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(read);
49*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(write);
50*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(dup2);
51*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__xstat);
52*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__lxstat);
53*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__lxstat64);
54*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(lseek);
55*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(lseek64);
56*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(chown);
57*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(truncate);
58*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(utime);
59*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(chmod);
60*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(rename);
61*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__xmknod);
62*1da177e4SLinus Torvalds 
63*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(symlink);
64*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(link);
65*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(unlink);
66*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(readlink);
67*1da177e4SLinus Torvalds 
68*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(mkdir);
69*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(rmdir);
70*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(opendir);
71*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(readdir);
72*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(closedir);
73*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(seekdir);
74*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(telldir);
75*1da177e4SLinus Torvalds 
76*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(ioctl);
77*1da177e4SLinus Torvalds 
78*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(pread64);
79*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(pwrite64);
80*1da177e4SLinus Torvalds 
81*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(statfs);
82*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(statfs64);
83*1da177e4SLinus Torvalds 
84*1da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(getuid);
85*1da177e4SLinus Torvalds 
86*1da177e4SLinus Torvalds /*
87*1da177e4SLinus Torvalds  * Overrides for Emacs so that we follow Linus's tabbing style.
88*1da177e4SLinus Torvalds  * Emacs will notice this stuff at the end of the file and automatically
89*1da177e4SLinus Torvalds  * adjust the settings for this buffer only.  This must remain at the end
90*1da177e4SLinus Torvalds  * of the file.
91*1da177e4SLinus Torvalds  * ---------------------------------------------------------------------------
92*1da177e4SLinus Torvalds  * Local variables:
93*1da177e4SLinus Torvalds  * c-file-style: "linux"
94*1da177e4SLinus Torvalds  * End:
95*1da177e4SLinus Torvalds  */
96