This commit is contained in:
plutoo 2018-01-20 19:33:53 +01:00
parent 97141448e9
commit d4db5b7647
4 changed files with 6 additions and 7 deletions

View File

@ -27,7 +27,7 @@ enum {
typedef void NORETURN (*LoaderReturnFn)(int result_code);
void envParse(void* ctx, Handle main_thread, LoaderReturnFn saved_lr);
void envSetup(void* ctx, Handle main_thread, LoaderReturnFn saved_lr);
Handle envGetMainThreadHandle(void);
bool envIsNso(void);

View File

@ -12,7 +12,7 @@ extern char* fake_heap_end;
extern u32 __argdata__;
void __system_initArgv(void)
void argvSetup(void)
{
Result rc=0;
MemoryInfo meminfo;

View File

@ -15,7 +15,7 @@ static char* g_nextLoadArgv = NULL;
extern __attribute__((weak)) u32 __nx_applet_type;
void envParse(void* ctx, Handle main_thread, LoaderReturnFn saved_lr)
void envSetup(void* ctx, Handle main_thread, LoaderReturnFn saved_lr)
{
// If we're running under NSO, we should just call svcExitProcess.
// Otherwise we should return to loader via LR.

View File

@ -4,8 +4,7 @@ void __nx_exit(int rc);
void virtmemSetup(void);
void newlibSetup(void);
void __system_initArgv(void);
void argvSetup(void);
extern u32 __nx_applet_type;
@ -102,13 +101,13 @@ void __attribute__((weak)) __libnx_init(void* ctx, Handle main_thread, void* sav
// Called by crt0.
// Libnx initialization goes here.
envParse(ctx, main_thread, saved_lr);
envSetup(ctx, main_thread, saved_lr);
newlibSetup();
virtmemSetup();
__libnx_initheap();
// Build argc/argv if present
__system_initArgv();
argvSetup();
// Initialize services.
__appInit();