This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: newlib under Linux, next version


DJ Delorie wrote:
> As long as, of course, you don't break other ports ;-)

I'll try ;-) Today, I succeeded to get newlib to build as a shared ELF
library. There are still a few rough edges, but I think I made it past
most of the "interesting" problems. The gory details are at
ftp://icaftp.epfl.ch/pub/people/almesber/misc/newlib-linux-2.tar.gz

One of the changes I had to make was to add a .type entry for each
global symbol in an assembler file. I'm not entirely sure how portable
this is (probably okay for most versions of gas, probably bad news for
other assemblers - does it matter ?), but here's the patch anyway.

- Werner

---------------------------------- cut here -----------------------------------

--- orig/newlib/libc/machine/i386/f_atan2.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_atan2.S	Tue Aug 22 16:38:40 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_atan2)
+	.type	SYM (_f_atan2),@function
 
 SYM (_f_atan2):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_atan2f.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_atan2f.S	Tue Aug 22 16:38:54 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_atan2f)
+	.type	SYM (_f_atan2f),@function
 
 SYM (_f_atan2f):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_frexp.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_frexp.S	Tue Aug 22 16:39:10 2000
@@ -21,6 +21,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_frexp)
+	.type	SYM (_f_frexp),@function
 
 SYM (_f_frexp):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_frexpf.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_frexpf.S	Tue Aug 22 16:39:17 2000
@@ -21,6 +21,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_frexpf)
+	.type	SYM (_f_frexpf),@function
 
 SYM (_f_frexpf):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_ldexp.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_ldexp.S	Tue Aug 22 16:39:26 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_ldexp)
+	.type	SYM (_f_ldexp),@function
 
 SYM (_f_ldexp):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_ldexpf.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_ldexpf.S	Tue Aug 22 16:40:04 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_ldexpf)
+	.type	SYM (_f_ldexpf),@function
 
 SYM (_f_ldexpf):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_log.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_log.S	Tue Aug 22 16:40:13 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_log)
+	.type	SYM (_f_log),@function
 
 SYM (_f_log):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_log10.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_log10.S	Tue Aug 22 16:40:22 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_log10)
+	.type	SYM (_f_log10),@function
 
 SYM (_f_log10):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_log10f.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_log10f.S	Tue Aug 22 16:40:29 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_log10f)
+	.type	SYM (_f_log10f),@function
 
 SYM (_f_log10f):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_logf.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_logf.S	Tue Aug 22 16:40:38 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_logf)
+	.type	SYM (_f_logf),@function
 
 SYM (_f_logf):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_tan.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_tan.S	Tue Aug 22 16:40:54 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_tan)
+	.type	SYM (_f_tan),@function
 
 SYM (_f_tan):
 	pushl ebp
--- orig/newlib/libc/machine/i386/f_tanf.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/f_tanf.S	Tue Aug 22 16:41:00 2000
@@ -20,6 +20,7 @@
 	#include "i386mach.h"
 
 	.global SYM (_f_tanf)
+	.type	SYM (_f_tanf),@function
 
 SYM (_f_tanf):
 	pushl ebp
--- orig/newlib/libc/machine/i386/memchr.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/memchr.S	Tue Aug 22 16:41:08 2000
@@ -11,6 +11,7 @@
 	#include "i386mach.h"
 	
 	.global	SYM (memchr)
+	.type	SYM (memchr),@function
 
 SYM (memchr):
 	pushl	ebp
--- orig/newlib/libc/machine/i386/memcmp.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/memcmp.S	Tue Aug 22 16:41:15 2000
@@ -11,6 +11,7 @@
 	#include "i386mach.h"
 
 	.global SYM (memcmp)
+	.type	SYM (memcmp),@function
 
 SYM (memcmp):
 
--- orig/newlib/libc/machine/i386/memcpy.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/memcpy.S	Tue Aug 22 16:41:28 2000
@@ -11,6 +11,7 @@
 	#include "i386mach.h"
 	
 	.global SYM (memcpy)
+	.type	SYM (memcpy),@function
 
 SYM (memcpy):
 
--- orig/newlib/libc/machine/i386/memmove.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/memmove.S	Tue Aug 22 16:41:36 2000
@@ -11,6 +11,7 @@
 	#include "i386mach.h"
 	
 	.global SYM (memmove)
+	.type	SYM (memmove),@function
 
 SYM (memmove):
 
--- orig/newlib/libc/machine/i386/memset.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/memset.S	Tue Aug 22 16:41:44 2000
@@ -11,6 +11,7 @@
 	#include "i386mach.h"
 
 	.global SYM (memset)
+	.type	SYM (memset),@function
 
 SYM (memset):
 
--- orig/newlib/libc/machine/i386/setjmp.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/setjmp.S	Tue Aug 22 16:42:05 2000
@@ -33,6 +33,7 @@
  *  It appears that the i386-coff configuration of gcc 2.6.2 does not
  *  do the __REGISTER_PREFIX__ correctly.  Fix this when it does.
  **********************************************************************/
+//#undef __REGISTER_PREFIX__ /* gcc -E defines this, but -dM doesn't show it */
 #define __REGISTER_PREFIX__ %
 #ifndef __REGISTER_PREFIX__
 #define __REGISTER_PREFIX__ 
@@ -77,6 +78,8 @@
 
         .global SYM (setjmp)
         .global SYM (longjmp)
+	.type	SYM (setjmp),@function
+	.type	SYM (longjmp),@function
  
 SYM (setjmp):
 
--- orig/newlib/libc/machine/i386/strchr.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/strchr.S	Tue Aug 22 16:42:12 2000
@@ -11,6 +11,7 @@
 	#include "i386mach.h"
 	
 	.global SYM (strchr)
+	.type	SYM (strchr),@function
 
 SYM (strchr):
 
--- orig/newlib/libc/machine/i386/strlen.S	Mon Aug 21 07:02:29 2000
+++ src/newlib/libc/machine/i386/strlen.S	Tue Aug 22 16:42:19 2000
@@ -11,6 +11,7 @@
 	#include "i386mach.h"
 
 	.global SYM (strlen)
+	.type	SYM (strlen),@function
 
 SYM (strlen):
 
-- 
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH       werner.almesberger@ica.epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]