Common/ELF Loader - Debug fixes and detection for no-relocated binaries
[tpg/acess2.git] / Usermode / Libraries / ld-acess.so_src / export.c
1 /*
2  * Acess2 Dynamic Linker
3  */
4 #include "common.h"
5 #include <acess/sys.h>
6
7 extern uint64_t __udivdi3(uint64_t Num, uint64_t Den);
8 extern uint64_t __umoddi3(uint64_t Num, uint64_t Den);
9 extern int32_t  __divsi3(int32_t Num, int32_t Den);
10 extern int32_t  __modsi3(int32_t Num, int32_t Den);
11 extern uint32_t __udivsi3(uint32_t Num, uint32_t Den);
12 extern uint32_t __umodsi3(uint32_t Num, uint32_t Den);
13
14
15 #define _STR(x) #x
16 #define STR(x)  _STR(x)
17 #define EXP(sym)        {&sym, STR(sym)}
18
19 // === CONSTANTS ===
20 const struct {
21         void    *Value;
22         char    *Name;
23 }       caLocalExports[] = {
24         EXP(gLoadedLibraries),
25         EXP(_exit),
26         EXP(clone),
27         EXP(kill),
28         EXP(yield),
29         EXP(sleep),
30         EXP(_SysWaitEvent),
31         EXP(waittid),
32         EXP(gettid),
33         EXP(getpid),
34         EXP(getuid),
35         EXP(getgid),
36
37         EXP(setuid),
38         EXP(setgid),
39
40         EXP(SysSetName),
41         //EXP(SysGetName),
42
43         EXP(_SysTimestamp),
44
45         //EXP(SysSetPri),
46
47         EXP(SysSendMessage),
48         EXP(SysGetMessage),
49
50         EXP(_SysSpawn),
51         EXP(execve),
52         EXP(SysLoadBin),
53         EXP(SysUnloadBin),
54
55         EXP(_SysSetFaultHandler),
56         
57         EXP(open),
58         EXP(reopen),
59         EXP(close),
60         EXP(read),
61         EXP(write),
62         EXP(seek),
63         EXP(tell),
64         EXP(finfo),
65         EXP(readdir),
66         EXP(_SysGetACL),
67         EXP(chdir),
68         EXP(ioctl),
69         EXP(_SysMount),
70         EXP(_SysSelect),
71
72         EXP(_SysOpenChild),
73         
74         EXP(_SysGetPhys),
75         EXP(_SysAllocate),
76         EXP(_SysDebug),
77
78         EXP(__umoddi3),
79         EXP(__udivdi3),
80         EXP(__divsi3),
81         EXP(__modsi3),
82         EXP(__udivsi3),
83         EXP(__umodsi3)
84 };
85
86 const int       ciNumLocalExports = sizeof(caLocalExports)/sizeof(caLocalExports[0]);

UCC git Repository :: git.ucc.asn.au