diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-06-07 14:29:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-06-07 14:29:19 +0000 |
commit | 798c6a3bddbf197712bd4b7d54ea01933cb669ef (patch) | |
tree | 223432385f8e5431f00f4553f5fa81d3db1a3fa4 | |
parent | 93d19e64b6cbce2e865191bbd53deac26978242b (diff) |
Richard Sandiford writes:
m68k uClinux doesn't use the normal ELF entry point interface.
This patch adjusts crt1.S accordingly. I've followed the ARM
example and keyed the choice of interface on __ARCH_USE_MMU__.
-rw-r--r-- | libc/sysdeps/linux/m68k/crt1.S | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/m68k/crt1.S b/libc/sysdeps/linux/m68k/crt1.S index ee25e48eb..9ce14e594 100644 --- a/libc/sysdeps/linux/m68k/crt1.S +++ b/libc/sysdeps/linux/m68k/crt1.S @@ -51,6 +51,13 @@ (4*(argc+1))(%sp) envp[0] ... NULL + + The uclinux conventions are different. %a1 is not defined on entry + and the stack is laid out as follows: + + 0(%sp) argc + 4(%sp) argv + 8(%sp) envp */ #include <features.h> @@ -73,15 +80,23 @@ _start: arguments for `main': argc, argv. envp will be determined later in __libc_start_main. */ move.l (%sp)+, %d0 /* Pop the argument count. */ +#ifndef __ARCH_USE_MMU__ + move.l (%sp)+, %a0 +#else move.l %sp, %a0 /* The argument vector starts just at the current stack top. */ +#endif /* Provide the highest stack address to the user code (for stacks which grow downward). */ pea (%sp) +#ifndef __ARCH_USE_MMU__ + clr.l -(%sp) +#else pea (%a1) /* Push address of the shared library termination function. */ +#endif /* Push the address of our own entry points to `.fini' and `.init'. */ |