소스 검색

Fix comments. Attempt at c++ global constructor support.

Eric Andersen 22 년 전
부모
커밋
7f4745c277
1개의 변경된 파일16개의 추가작업 그리고 2개의 파일을 삭제
  1. 16 2
      libc/sysdeps/linux/mips/crt0.c

+ 16 - 2
libc/sysdeps/linux/mips/crt0.c

@@ -1,6 +1,6 @@
 /*
- * uC-libc/sysdeps/linux/powerpc/crt0.S
- * process init code for powerpc
+ * uC-libc/sysdeps/linux/mipsel/crt0.c
+ * process init code for mipsel
  *
  * Copyright (C) 2001 by Lineo, Inc.
  * Author: David A. Schleef <ds@schleef.org>
@@ -30,6 +30,20 @@ asm(
 	);
 #endif
 
+/* a little bit of stuff to support C++ */
+asm(
+	"\t.section .ctors,\"aw\"\n"
+	"\t.align 4\n"
+	"\t.global __CTOR_LIST__\n"
+	"__CTOR_LIST__:\n"
+	"\t.long -1\n"
+	"\t.section .dtors,\"aw\"\n"
+	"\t.align 4\n"
+	"\t.global __DTOR_LIST__\n"
+	"__DTOR_LIST__:\n"
+	"\t.long -1\n"
+	);
+
 void __uClibc_main(int argc,void *argv,void *envp);
 
 void __start(void)