1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-12 23:16:40 +00:00

Stratosphere: Properly overwrite appInit/appExit for libnx in loader

This commit is contained in:
Michael Scire 2018-04-19 07:07:43 -06:00
parent f0759b0afc
commit d39c3b8efc

View file

@ -13,13 +13,21 @@
#include "ldr_debug_monitor.hpp" #include "ldr_debug_monitor.hpp"
#include "ldr_shell.hpp" #include "ldr_shell.hpp"
extern u32 __start__; extern "C" {
extern u32 __start__;
u32 __nx_applet_type = AppletType_None; u32 __nx_applet_type = AppletType_None;
#define INNER_HEAP_SIZE 0x200000
size_t nx_inner_heap_size = INNER_HEAP_SIZE;
char nx_inner_heap[INNER_HEAP_SIZE];
void __libnx_initheap(void);
void __appInit(void);
void __appExit(void);
}
#define INNER_HEAP_SIZE 0x200000
size_t nx_inner_heap_size = INNER_HEAP_SIZE;
char nx_inner_heap[INNER_HEAP_SIZE];
void __libnx_initheap(void) { void __libnx_initheap(void) {
void* addr = nx_inner_heap; void* addr = nx_inner_heap;
@ -49,9 +57,11 @@ void __appInit(void) {
if (R_FAILED(rc)) if (R_FAILED(rc))
fatalSimple(0xCAFE << 4 | 1); fatalSimple(0xCAFE << 4 | 1);
/* Disable.
rc = fsldrInitialize(); rc = fsldrInitialize();
if (R_FAILED(rc)) if (R_FAILED(rc))
fatalSimple(0xCAFE << 4 | 2); fatalSimple(0xCAFE << 4 | 2);
*/
fsdevInit(); fsdevInit();
} }