diff options
Diffstat (limited to 'libc/sysdeps')
-rw-r--r-- | libc/sysdeps/linux/arm/crt0.S | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/arm/crt0.S b/libc/sysdeps/linux/arm/crt0.S index 115650f98..49d4bedfe 100644 --- a/libc/sysdeps/linux/arm/crt0.S +++ b/libc/sysdeps/linux/arm/crt0.S @@ -5,6 +5,11 @@ argv[argc-1] end of args (integer) env[0...N] environment variables (pointers) NULL + + When we are done here, we want + a1=argc + a2=argv[0] + a3=argv[argc+1] This file now uses the register naming from the ARM Procedure Calling Standard @@ -54,10 +59,10 @@ _start: /* clear the frame pointer */ mov fp, #0 - /* Load argc into a1 -- its final resting place */ + /* Load register a1 (argc) from the stack to its final resting place */ ldr a1, [sp], #4 - /* Load argv into a2 -- which its final resting place */ + /* Copy argv pointer into a2 -- which its final resting place */ mov a2, sp /* Set up environ, skip to the end of argv, and put |