Usermode/ld-acess - Clean up loadlib.c, improved debug
[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 extern void     ldacess_DumpLoadedLibraries(void);
14 extern void     _ZN4_sys5debugEPKcz(const char *,...);  // C++ "_sys::debug" used by STL debug
15
16 #define _STR(x) #x
17 #define STR(x)  _STR(x)
18 #define EXP(sym)        {&sym, STR(sym)}
19
20 #define SYSCALL0(name,num)      EXP(name),
21 #define SYSCALL1(name,num)      EXP(name),
22 #define SYSCALL2(name,num)      EXP(name),
23 #define SYSCALL3(name,num)      EXP(name),
24 #define SYSCALL4(name,num)      EXP(name),
25 #define SYSCALL5(name,num)      EXP(name),
26 #define SYSCALL6(name,num)      EXP(name),
27
28 // === CONSTANTS ===
29 const tLocalExport caLocalExports[] = {
30         EXP(gLoadedLibraries),
31         EXP(_errno),
32         EXP(ldacess_DumpLoadedLibraries),
33         
34         #define __ASSEMBLER__
35         #include "arch/syscalls.s.h"
36         #undef __ASSEMBLER__
37         
38         #ifdef ARCHDIR_is_armv7
39         {0, "__gnu_Unwind_Find_exidx"},
40         {0, "__cxa_call_unexpected"},
41         {0, "__cxa_type_match"},
42         {0, "__cxa_begin_cleanup"},
43         #endif
44 };
45
46 const int       ciNumLocalExports = sizeof(caLocalExports)/sizeof(caLocalExports[0]);

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