aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/user_syms.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/um/os-Linux/user_syms.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/um/os-Linux/user_syms.c')
-rw-r--r--arch/um/os-Linux/user_syms.c95
1 files changed, 95 insertions, 0 deletions
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
new file mode 100644
index 000000000000..75d7af9ae1d2
--- /dev/null
+++ b/arch/um/os-Linux/user_syms.c
@@ -0,0 +1,95 @@
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
8 * add an EXPORT for the glibc one.*/
9
10#undef strlen
11#undef strstr
12#undef memcpy
13#undef memset
14
15extern size_t strlen(const char *);
16extern void *memcpy(void *, const void *, size_t);
17extern void *memmove(void *, const void *, size_t);
18extern void *memset(void *, int, size_t);
19extern int printf(const char *, ...);
20
21EXPORT_SYMBOL(strlen);
22EXPORT_SYMBOL(memcpy);
23EXPORT_SYMBOL(memmove);
24EXPORT_SYMBOL(memset);
25EXPORT_SYMBOL(printf);
26
27EXPORT_SYMBOL(strstr);
28
29/* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms.
30 * However, the modules will use the CRC defined *here*, no matter if it is
31 * good; so the versions of these symbols will always match
32 */
33#define EXPORT_SYMBOL_PROTO(sym) \
34 int sym(void); \
35 EXPORT_SYMBOL(sym);
36
37#ifdef SUBARCH_i386
38EXPORT_SYMBOL(vsyscall_ehdr);
39EXPORT_SYMBOL(vsyscall_end);
40#endif
41
42EXPORT_SYMBOL_PROTO(__errno_location);
43
44EXPORT_SYMBOL_PROTO(access);
45EXPORT_SYMBOL_PROTO(open);
46EXPORT_SYMBOL_PROTO(open64);
47EXPORT_SYMBOL_PROTO(close);
48EXPORT_SYMBOL_PROTO(read);
49EXPORT_SYMBOL_PROTO(write);
50EXPORT_SYMBOL_PROTO(dup2);
51EXPORT_SYMBOL_PROTO(__xstat);
52EXPORT_SYMBOL_PROTO(__lxstat);
53EXPORT_SYMBOL_PROTO(__lxstat64);
54EXPORT_SYMBOL_PROTO(lseek);
55EXPORT_SYMBOL_PROTO(lseek64);
56EXPORT_SYMBOL_PROTO(chown);
57EXPORT_SYMBOL_PROTO(truncate);
58EXPORT_SYMBOL_PROTO(utime);
59EXPORT_SYMBOL_PROTO(chmod);
60EXPORT_SYMBOL_PROTO(rename);
61EXPORT_SYMBOL_PROTO(__xmknod);
62
63EXPORT_SYMBOL_PROTO(symlink);
64EXPORT_SYMBOL_PROTO(link);
65EXPORT_SYMBOL_PROTO(unlink);
66EXPORT_SYMBOL_PROTO(readlink);
67
68EXPORT_SYMBOL_PROTO(mkdir);
69EXPORT_SYMBOL_PROTO(rmdir);
70EXPORT_SYMBOL_PROTO(opendir);
71EXPORT_SYMBOL_PROTO(readdir);
72EXPORT_SYMBOL_PROTO(closedir);
73EXPORT_SYMBOL_PROTO(seekdir);
74EXPORT_SYMBOL_PROTO(telldir);
75
76EXPORT_SYMBOL_PROTO(ioctl);
77
78EXPORT_SYMBOL_PROTO(pread64);
79EXPORT_SYMBOL_PROTO(pwrite64);
80
81EXPORT_SYMBOL_PROTO(statfs);
82EXPORT_SYMBOL_PROTO(statfs64);
83
84EXPORT_SYMBOL_PROTO(getuid);
85
86/*
87 * Overrides for Emacs so that we follow Linus's tabbing style.
88 * Emacs will notice this stuff at the end of the file and automatically
89 * adjust the settings for this buffer only. This must remain at the end
90 * of the file.
91 * ---------------------------------------------------------------------------
92 * Local variables:
93 * c-file-style: "linux"
94 * End:
95 */