mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-23 04:41:12 +00:00
Fix bug in crt0
This commit is contained in:
parent
461e886244
commit
d43255d484
3 changed files with 5 additions and 0 deletions
|
@ -41,6 +41,8 @@ _start:
|
||||||
ldr r0, =__program_argc
|
ldr r0, =__program_argc
|
||||||
ldr r1, =__program_argv
|
ldr r1, =__program_argv
|
||||||
ldr lr, =__program_exit
|
ldr lr, =__program_exit
|
||||||
|
ldr r0, [r0]
|
||||||
|
ldr r1, [r1]
|
||||||
b main
|
b main
|
||||||
|
|
||||||
/* No need to include this in normal programs: */
|
/* No need to include this in normal programs: */
|
||||||
|
|
|
@ -47,6 +47,7 @@ int main(int argc, void **argv) {
|
||||||
g_stage2_args = (stage2_args_t *)argv[STAGE2_ARGV_ARGUMENT_STRUCT];
|
g_stage2_args = (stage2_args_t *)argv[STAGE2_ARGV_ARGUMENT_STRUCT];
|
||||||
|
|
||||||
if(g_stage2_args->version != 0) {
|
if(g_stage2_args->version != 0) {
|
||||||
|
printf("Error: Incorrect Stage2 args version (expected %lu, got %lu)!\n", 0lu, g_stage2_args->version);
|
||||||
generic_panic();
|
generic_panic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ _start:
|
||||||
ldr r0, =__program_argc
|
ldr r0, =__program_argc
|
||||||
ldr r1, =__program_argv
|
ldr r1, =__program_argv
|
||||||
ldr lr, =__program_exit
|
ldr lr, =__program_exit
|
||||||
|
ldr r0, [r0]
|
||||||
|
ldr r1, [r1]
|
||||||
b main
|
b main
|
||||||
|
|
||||||
/* No need to include this in normal programs: */
|
/* No need to include this in normal programs: */
|
||||||
|
|
Loading…
Reference in a new issue