diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-01-14 10:18:12 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-01-14 10:18:12 +0000 |
commit | 2d997660372123ab6ac1ee519b22fe015eaa787b (patch) | |
tree | 84113699b597082144aef54a0a7db92289f961fd /libc/sysdeps/linux | |
parent | c55044b05f6672f4a262f67e12d8875841c99a4a (diff) |
fix loading of argc/argv for arm/nommu
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r-- | libc/sysdeps/linux/arm/crt1.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/arm/crt1.S b/libc/sysdeps/linux/arm/crt1.S index 7470715a1..8e0faab47 100644 --- a/libc/sysdeps/linux/arm/crt1.S +++ b/libc/sysdeps/linux/arm/crt1.S @@ -110,9 +110,19 @@ _start: mov fp, #0 mov lr, #0 +#ifdef __ARCH_HAS_MMU__ /* Pop argc off the stack and save a pointer to argv */ ldr a2, [sp], #4 mov a3, sp +#else + /* + * uClinux/arm stacks look a little different from normal + * MMU-full Linux/arm stacks (for no good reason) + */ + /* pull argc and argv off the stack */ + ldr a2, [sp, #0] + ldr a3, [sp, #4] +#endif /* Push stack limit */ str a3, [sp, #-4]! |