Просмотр исходного кода

arm/crt1.S needs features.h and the weak _init/_fini independently of __PIC__. Add these weaks to mips/crt1.S as well.

Peter S. Mazinger 18 лет назад
Родитель
Сommit
a1f8c408d8
2 измененных файлов с 19 добавлено и 13 удалено
  1. 10 8
      libc/sysdeps/linux/arm/crt1.S
  2. 9 5
      libc/sysdeps/linux/mips/crt1.S

+ 10 - 8
libc/sysdeps/linux/arm/crt1.S

@@ -75,9 +75,16 @@ ARM register quick reference:
     pc      r15          program counter
 */
 
-	.text
-	.globl _start
-	.type _start,#function
+#include <features.h>
+
+.text
+	.globl	_start
+	.type	_start,#function
+#ifndef __UCLIBC_CTOR_DTOR__
+	.weak	_init
+	.weak	_fini
+#endif
+
 _start:
 	/* Clear the frame pointer and link register since this is the outermost frame.  */
 	mov fp, #0
@@ -133,13 +140,8 @@ _start:
 	.word _init(GOT)
 	.word main(GOT)
 #else
-# ifdef __UCLIBC_CTOR_DTOR__
 	.type _init,%function
 	.type _fini,%function
-# else
-	.weak _fini
-	.weak _init
-# endif
 #endif
 
 /* Define a symbol for the first piece of initialized data.  */

+ 9 - 5
libc/sysdeps/linux/mips/crt1.S

@@ -37,7 +37,7 @@
 
 
 #include <sys/regdef.h>
-
+#include <features.h>
 
 
 /* This is the canonical entry point, usually the first thing in the text
@@ -70,10 +70,14 @@
 */
 
 .text
-	.globl	    __start
-	.type	    __start,@function
-	.type	    _init,@function
-	.type	    _fini,@function
+	.globl	__start
+	.type	__start,@function
+	.type	_init,@function
+	.type	_fini,@function
+#ifndef __UCLIBC_CTOR_DTOR__
+	.weak	_init
+	.weak	_fini
+#endif
 	.type	    main,@function
 	.type	    __uClibc_main,@function