Ejemplo n.º 1
0
void __attribute__((weak)) __libctru_init(void (*retAddr)(void))
{
	// Register newlib exit() syscall
	__syscalls.exit = __ctru_exit;
    __syscalls.gettod_r = __libctru_gtod;

	__system_retAddr = __service_ptr ? retAddr : NULL;

	if (__sync_init)
		__sync_init();

	__system_allocateHeaps();

	// Build argc/argv if present
	__system_initArgv();

}
Ejemplo n.º 2
0
void __attribute__((weak)) __libctru_init(void (*retAddr)(void))
{
   /* Store the return address */
   __system_retAddr = NULL;
   if (envIsHomebrew()) {
      __system_retAddr = retAddr;
   }

   /* Initialize the synchronization subsystem */
   __sync_init();

   /* Initialize newlib support system calls */
   __system_initSyscalls();

   /* Allocate application and linear heaps */
   __system_allocateHeaps();
}
Ejemplo n.º 3
0
void __attribute__((weak)) __libctru_init(void (*retAddr)(void))
{
	// Store the return address
	__system_retAddr = envIsHomebrew() ? retAddr : NULL;

	// Initialize the synchronization subsystem
	__sync_init();

	// Initialize newlib support system calls
	__system_initSyscalls();

	// Allocate application and linear heaps
	__system_allocateHeaps();

	// Build argc/argv if present
	__system_initArgv();

}