#include <stdint.h>\r
#include <stddef.h>\r
#include "common.h"\r
+#undef SoMain\r
\r
// === PROTOTYPES ===\r
void *DoRelocate(void *base, char **envp, const char *Filename);\r
extern char gLinkedBase[];\r
char **gEnvP;\r
extern int memcmp(const void *m1, const void *m2, size_t size);\r
+extern void CallQueuedEntrypoints(char **EnvP);\r
\r
// === CODE ===\r
/**\r
}\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
for(;;);\r
}\r
\r
- SysDebug("ld-acess - SoMain: ret = %p", ret); \r
+ // Call queued entry points (from libraries)\r
+ CallQueuedEntrypoints(envp);\r
+\r
+ SysDebug("ld-acess - SoMain: Program entry %p", ret); \r
return ret;\r
}\r
\r