瀏覽代碼

Cosmetic cleanup.

Tobias Anderberg 23 年之前
父節點
當前提交
3e2f4de2b2

+ 0 - 1
libc/sysdeps/linux/cris/Makefile

@@ -53,7 +53,6 @@ $(COBJS): %.o : %.c
 
 headers:
 	@(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h ) 
-#	cd $(TOPDIR)/include/sys && ln -fs ../../libc/sysdeps/linux/m68k/reg.h .
 
 clean:
 	rm -f *.[oa] *~ core

+ 3 - 3
libc/sysdeps/linux/cris/__init_brk.c

@@ -11,10 +11,10 @@ int
 __init_brk (void)
 {
     if (___brk_addr == 0) {
-	    /* Notice that we don't need to save/restore the GOT
-	     * register since that is not call clobbered by the syscall
+	    /* 
+		 * Notice that we don't need to save/restore the GOT
+	     * register since that is not call clobbered by the syscall.
 	     */
-	    
 	    asm ("clear.d $r10\n\t"
 		 "movu.w " STR(__NR_brk) ",$r9\n\t"
 		 "break 13\n\t"

+ 3 - 3
libc/sysdeps/linux/cris/brk.c

@@ -10,10 +10,10 @@ extern int __init_brk (void);
 int brk(void * end_data_seg)
 {
 	if (__init_brk () == 0) {
-		/* Notice that we don't need to save/restore the GOT
-		 * register since that is not call clobbered by the syscall
+		/* 
+		 * Notice that we don't need to save/restore the GOT
+		 * register since that is not call clobbered by the syscall.
 		 */
-		
 		asm ("move.d %1,$r10\n\t"
 		     "movu.w " STR(__NR_brk) ",$r9\n\t"
 		     "break 13\n\t"

+ 18 - 17
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);
 }

+ 3 - 3
libc/sysdeps/linux/cris/sbrk.c

@@ -15,10 +15,10 @@ sbrk(intptr_t increment)
 	if (__init_brk () == 0) {
 		void * tmp = ___brk_addr + increment;
 
-		/* Notice that we don't need to save/restore the GOT
-		 * register since that is not call clobbered by the syscall
+		/* 
+		 * Notice that we don't need to save/restore the GOT
+		 * register since that is not call clobbered by the syscall.
 		 */
-		
 		asm ("move.d %1,$r10\n\t"
 		     "movu.w " STR(__NR_brk) ",$r9\n\t"
 		     "break 13\n\t"

+ 5 - 1
libc/sysdeps/linux/cris/sysdep.h

@@ -17,6 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYSDEP_H_
+#define _SYSDEP_H_
+
 #ifndef C_LABEL
 
 /* Define a macro we can use to construct the asm name for a C symbol.  */
@@ -138,4 +141,5 @@
 #define	syscall_error	__syscall_error
 #define mcount		_mcount
 
-#endif	/* __ASSEMBLER__ */
+#endif /* __ASSEMBLER__ */
+#endif /* _SYSDEP_H_ */