\r
// === Imports ===\r
extern void gLinkedBase;\r
+extern tLoadedLib gLoadedLibraries[];\r
\r
// === CODE ===\r
/**\r
// - Assume that the file pointer will be less than 4096\r
if(base < 0x1000) {\r
SysDebug("ld-acess - SoMain: Passed file pointer %i\n", base);\r
- SysExit();\r
+ _exit(-1);\r
for(;;);\r
}\r
// Check if we are being called directly\r
if(base == (Uint)&gLinkedBase) {\r
SysDebug("ld-acess should not be directly called\n");\r
- SysExit();\r
+ _exit(1);\r
for(;;);\r
}\r
+\r
+ gLoadedLibraries[0].Base = (Uint)&gLinkedBase;\r
+ gLoadedLibraries[0].Name = "/Acess/Libs/libld-acess.so";\r
\r
// Otherwise do relocations\r
//ret = DoRelocate( base, envp, "Executable" );\r
ret = DoRelocate( base, NULL, "Executable" );\r
if( ret == 0 ) {\r
SysDebug("ld-acess - SoMain: Relocate failed, base=0x%x\n", base);\r
- SysExit();\r
+ _exit(-1);\r
for(;;);\r
}\r
\r
SysDebug("ld-acess - DoRelocate: Unkown file format '0x%x 0x%x 0x%x 0x%x'\n",\r
*(Uint8*)(base), *(Uint8*)(base+1), *(Uint8*)(base+2), *(Uint8*)(base+3) );\r
SysDebug("ld-acess - DoRelocate: File '%s'\n", Filename);\r
- SysExit();\r
+ _exit(-1);\r
for(;;);\r
}\r
\r