This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


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

2.0.104


I have built 2.0.104 on ARM Linux on our NetWinder.  It requires 3 patches to
configure and run correctly.

1. A patch for the big endian floating point word order.  I'll let Phil handle
that one.

2. To get configure to recognize the new ARM uname syntax the attached patch to
config.sub is required.
I'm not exactly sure this is the correct place to submit a patch for config.sub,
so let me know if I should send it elsewhere.

3. ld-linux.so.2 segfaults without the patch to the bootstrap code in
dl-machine.h.  Without this patch, running "../elf/ld-linux.so.2 <program>"
always segfaults.

The problems is with the libc_lock_*() macros.  For example:

#define __libc_lock_init(NAME) \
   (__pthread_mutex_init != NULL ? __pthread_mutex_init(&(NAME), NULL) : 0;

On the ARM architechure, __pthread_mutex_init was not NULL.  The reason for this
is that ld-linux.so.2 wants to load at address 0, which the ARM Linux kernel
will not allow (the interrupt vector tables reside there, and can't be moved). 
It forces ld-linux.so.2 to load at 0x1000.  The bootstrap code detects this and
adds 0x1000 to all symbol addresses, thus __pthread_mutex_init will no longer be
NULL.

Finally, make check fails in posix/tests with a memory violation running:

/bin/sh -e wordexp-tst.sh ../ ../elf ld-linux.so.2

Does this happen on any other architechure, or is it ARM specific?  I'm willing
to investigate, but someone will have to give me a heads up on what the tests
are supposed to do.  I'm afraid I haven't a clue.

Scott
--- libc/scripts/config.sub	Tue Oct 27 11:38:36 1998
+++ glibc/scripts/config.sub	Tue Nov  3 16:20:40 1998
@@ -182,7 +182,7 @@
 	      | sparc64-* | mips64-* | mipsel-* \
 	      | mips64el-* | mips64orion-* | mips64orionel-*  \
 	      | mipstx39-* | mipstx39el-* \
-	      | f301-*)
+	      | f301-* | armv*-*)
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -412,6 +412,10 @@
 		basic_machine=i486-ncr
 		os=-sysv4
 		;;
+	netwinder)
+		basic_machine=armv4l-ccc
+		os=-linux
+		;;
 	news | news700 | news800 | news900)
 		basic_machine=m68k-sony
 		os=-newsos
@@ -801,6 +805,9 @@
 case $basic_machine in
 	*-acorn)
 		os=-riscix1.2
+		;;
+	arm*-ccc)
+		os=-linux
 		;;
 	arm*-semi)
 		os=-aout
--- dl-machine.h	Mon Oct  5 14:06:01 1998
+++ /home/scottb/projects/glibc-2.0.100/sysdeps/arm/dl-machine.h	Wed Nov 11 13:35:05 1998
@@ -416,7 +416,12 @@
 	  break;
 	case R_ARM_GLOB_DAT:
 	case R_ARM_JUMP_SLOT:
-	  *reloc_addr = value;
+	    *reloc_addr = value;
+#ifdef RTLD_BOOTSTRAP
+	/* fix for pthread calls. */
+	    if (sym && (0 == sym->st_value))
+	      *reloc_addr = 0;
+#endif	      	    
 	  break;
 	case R_ARM_ABS32:
 	  {

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