char *Name;
} caLocalExports[];
extern const int ciNumLocalExports;
+extern char **gEnvP;
// === GLOABLS ===
tLoadedLib gLoadedLibraries[MAX_LOADED_LIBRARIES];
// Call Entrypoint
DEBUGS(" LoadLibrary: '%s' Entry %p", SoName, fEntry);
- fEntry(base, 0, NULL, envp);
+ fEntry(base, 0, NULL, gEnvP);
DEBUGS("LoadLibrary: RETURN 1");
return base;
// === Imports ===\r
extern char gLinkedBase[];\r
extern tLoadedLib gLoadedLibraries[];\r
+char **gEnvP;\r
\r
// === CODE ===\r
/**\r
\brief Library entry point\r
\note This is the entrypoint for the library\r
*/\r
-void *SoMain(void *base)\r
+void *SoMain(void *base, int argc, char **argv, char **envp)\r
{\r
void *ret;\r
\r
+ gEnvP = envp;\r
+\r
// - Assume that the file pointer will be less than 4096\r
if((intptr_t)base < 0x1000) {\r
SysDebug("ld-acess - SoMain: Passed file pointer %i\n", base);\r