mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
Initialize heap, increase stack size
This commit is contained in:
parent
dc3099781d
commit
0d344e45af
2 changed files with 21 additions and 10 deletions
|
@ -14,6 +14,14 @@ char g_bct0[0x8000];
|
|||
/* Allow for main(int argc, void **argv) signature. */
|
||||
#pragma GCC diagnostic ignored "-Wmain"
|
||||
|
||||
void __init_heap(void) {
|
||||
extern char* fake_heap_start;
|
||||
extern char* fake_heap_end;
|
||||
|
||||
fake_heap_start = (char*)0xF0000000;
|
||||
fake_heap_end = (char*)0xFFF00000;
|
||||
}
|
||||
|
||||
int main(int argc, void **argv) {
|
||||
stage2_args_t args = {0};
|
||||
loader_ctx_t *loader_ctx = get_loader_ctx();
|
||||
|
|
|
@ -33,7 +33,7 @@ _start:
|
|||
|
||||
_relocation_loop_end:
|
||||
/* Set the stack pointer */
|
||||
ldr sp, =0x40008000
|
||||
ldr sp, =0x40010000
|
||||
mov fp, #0
|
||||
stmfd sp!, {r0, r1}
|
||||
|
||||
|
@ -44,6 +44,9 @@ _start:
|
|||
sub r2, r2, r0
|
||||
bl memset
|
||||
|
||||
/* Initialize the heap */
|
||||
bl __init_heap
|
||||
|
||||
/* Call global constructors */
|
||||
bl __libc_init_array
|
||||
|
||||
|
|
Loading…
Reference in a new issue