9 int main(int argc, char *argv[], char **envp)
15 int (*appMain)(int, char *[], char **);
18 for( i = 1; i < argc; i ++ )
20 if( argv[i][0] != '-' ) break;
24 fprintf(stderr, "Usage: ld-acess <executable> [arguments ...]\n");
33 printf("Exectutable Path: '%s'\n", appPath);
34 printf("Executable argc = %i\n", appArgc);
36 base = Binary_Load(appPath, (uintptr_t*)&appMain);
37 printf("base = %p\n", base);
38 if( !base ) return 127;
40 printf("==============================\n");
41 for(i = 0; i < appArgc; i ++)
42 printf("\"%s\" ", appArgv[i]);
44 __asm__ __volatile__ (
49 : : "r" (envp), "r" (appArgv), "r" (appArgc), "r" (appMain) );
50 //return appMain(appArgc, appArgv, envp);
54 void Warning(const char *Format, ...)
58 va_start(args, Format);
59 vprintf(Format, args);
64 void Notice(const char *Format, ...)
68 va_start(args, Format);
69 vprintf(Format, args);