فهرست منبع

move __fpscr_values out of crt0 and into libc as proposed by Daniel Jacobowitz so that libm.so links properly with newer toolchains

Mike Frysinger 19 سال پیش
والد
کامیت
74f2f592bb
3فایلهای تغییر یافته به همراه35 افزوده شده و 8 حذف شده
  1. 1 1
      libc/sysdeps/linux/sh/Makefile
  2. 34 0
      libc/sysdeps/linux/sh/___fpscr_values.S
  3. 0 7
      libc/sysdeps/linux/sh/crt0.S

+ 1 - 1
libc/sysdeps/linux/sh/Makefile

@@ -24,7 +24,7 @@ CRT0_SRC = crt0.S
 CRT0_OBJ = crt0.o crt1.o
 CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
 
-SSRC=setjmp.S __longjmp.S vfork.S clone.S
+SSRC=setjmp.S __longjmp.S vfork.S clone.S ___fpscr_values.S
 SOBJS=$(patsubst %.S,%.o, $(SSRC))
 
 CSRC=mmap.c longjmp.c pipe.c __init_brk.c brk.c sbrk.c syscall.c pread_write.c

+ 34 - 0
libc/sysdeps/linux/sh/___fpscr_values.S

@@ -0,0 +1,34 @@
+/* Startup code for SH & ELF.
+   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 2001 Hewlett-Packard Australia
+   Copyright (C) 2002 Stefan Allius
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Library General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
+ details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#include <features.h>
+
+.data
+#if defined(__CONFIG_SH4__)
+.global ___fpscr_values
+.type ___fpscr_values,@object
+.size ___fpscr_values,8
+___fpscr_values:
+	.long   0
+	.long   0x80000
+
+.weak __fpscr_values
+	__fpscr_values = ___fpscr_values
+#endif

+ 0 - 7
libc/sysdeps/linux/sh/crt0.S

@@ -134,10 +134,3 @@ __data_start:
 	.long 0
 	.weak data_start
 	data_start = __data_start
-#if defined __CONFIG_SH4__
-       .global __fpscr_values
-__fpscr_values:
-       .long   0
-       .long   0x80000
-#endif
-