summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/cris/crt0.c
diff options
context:
space:
mode:
authorTobias Anderberg <tobias.anderberg@axis.com>2002-09-23 12:21:14 +0000
committerTobias Anderberg <tobias.anderberg@axis.com>2002-09-23 12:21:14 +0000
commit3e2f4de2b24ce2e3bc1733f55292cf496eb4bd83 (patch)
tree147c8098a97ab6b47524755062c52e185c2080f3 /libc/sysdeps/linux/cris/crt0.c
parent3a5a812fd610a5bfacadac212c35bdf04c852e26 (diff)
Cosmetic cleanup.
Diffstat (limited to 'libc/sysdeps/linux/cris/crt0.c')
-rw-r--r--libc/sysdeps/linux/cris/crt0.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/libc/sysdeps/linux/cris/crt0.c b/libc/sysdeps/linux/cris/crt0.c
index 03b0d6ff3..4fe68ce05 100644
--- a/libc/sysdeps/linux/cris/crt0.c
+++ b/libc/sysdeps/linux/cris/crt0.c
@@ -1,24 +1,22 @@
-/* $Id: crt0.c,v 1.1 2002/09/16 08:08:33 tobiasa Exp $ */
-
-/* C base for Linux/CRIS 2.0/2.4
- */
-
-//#define DEBUG
+/* Startup code compliant to the ELF CRIS ABI */
/* The first piece of initialized data. */
int __data_start = 0;
-/* N.B.: It is important that this be the first function.
- This file is the first thing in the text section. */
-
+/*
+ * It is important that this be the first function.
+ * This file is the first thing in the text section.
+ */
void
_start ()
{
- /* on the stack we have argc. we can calculate argv/envp
+ /*
+ * On the stack we have argc. We can calculate argv/envp
* from that and the succeeding stack location, but fix so
- * we get the right calling convention (regs in r10/r11)
+ * we get the right calling convention (regs in r10/r11).
*
- * to understand this you really ought to read fs/binfmt_elf.c
+ * Please view linux/fs/binfmt_elf.c for a complete
+ * understanding of this.
*/
__asm__ volatile("pop $r10");
__asm__ volatile("move.d $sp, $r11");
@@ -36,14 +34,17 @@ start1 (int argc, char **argv)
/* The environment starts just after ARGV. */
environ = &argv[argc + 1];
- /* If the first thing after ARGV is the arguments
- themselves, there is no environment. */
+ /*
+ * If the first thing after ARGV is the arguments
+ * themselves, there is no environment.
+ */
if ((char *) environ == *argv)
- /* The environment is empty. Make environ
- point at ARGV[ARGC], which is NULL. */
+ /*
+ * The environment is empty. Make environ
+ * point at ARGV[ARGC], which is NULL.
+ */
--environ;
/* Leave control to the libc */
-
__uClibc_main(argc, argv, environ);
}