about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-12-07 01:33:01 +0000
committerUlrich Drepper <drepper@redhat.com>2003-12-07 01:33:01 +0000
commit57d20ee7f27850f2c14e7eeb1e64807e6431d469 (patch)
treeeeb65ef7a87f7d0653c5b15c50aead14e2ca75c2
parentc2630c3abf76d29e8ec5fd2ccb32b43d1cacdf50 (diff)
downloadglibc-57d20ee7f27850f2c14e7eeb1e64807e6431d469.tar.gz
glibc-57d20ee7f27850f2c14e7eeb1e64807e6431d469.tar.xz
glibc-57d20ee7f27850f2c14e7eeb1e64807e6431d469.zip
Update.
2003-12-06  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
	instead of .init.  Patch by David Mosberger.
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c32
2 files changed, 33 insertions, 4 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 551878fd1e..4c3bc0c5c7 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-06  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
+	instead of .init.  Patch by David Mosberger.
+
 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
 
 	* sysdeps/pthread/configure.in: Remove broken declaration in C
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c b/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c
index 6155183be3..a048839fb7 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c
@@ -36,6 +36,22 @@
    * crtn.s puts the corresponding function epilogues
    in the .init and .fini sections. */
 
+#include <stddef.h>
+
+#ifdef HAVE_INITFINI_ARRAY
+
+__asm__ ("\n\
+#include \"defs.h\"\n\
+\n\
+/*@HEADER_ENDS*/\n\
+\n\
+/*@_init_PROLOG_BEGINS*/\n\
+	.xdata8 \".init_array\",@fptr(__pthread_initialize_minimal_internal)\n\
+/*@_init_PROLOG_ENDS*/\n\
+");
+
+#else
+
 __asm__ ("\n\
 \n\
 #include \"defs.h\"\n\
@@ -48,13 +64,16 @@ __asm__ ("\n\
 	.global _init#\n\
 	.proc _init#\n\
 _init:\n\
+	.prologue\n\
+	.save ar.pfs, r34\n\
 	alloc r34 = ar.pfs, 0, 3, 0, 0\n\
+	.vframe r32\n\
 	mov r32 = r12\n\
+	.save rp, r33\n\
 	mov r33 = b0\n\
+	.body\n\
 	adds r12 = -16, r12\n\
 	;;\n\
-/* we could use r35 to save gp, but we use the stack since that's what\n\
- * all the other init routines will do --davidm 00/04/05 */\n\
 	st8 [r12] = gp, -16\n\
 	br.call.sptk.many b0 = __pthread_initialize_minimal_internal# ;;\n\
 	;;\n\
@@ -62,7 +81,6 @@ _init:\n\
 	;;\n\
 	ld8 gp = [r12]\n\
 	;;\n\
-	.align 16\n\
 	.endp _init#\n\
 \n\
 /*@_init_PROLOG_ENDS*/\n\
@@ -83,12 +101,16 @@ _init:\n\
 	.global _fini#\n\
 	.proc _fini#\n\
 _fini:\n\
+	.prologue\n\
+	.save ar.pfs, r34\n\
 	alloc r34 = ar.pfs, 0, 3, 0, 0\n\
+	.vframe r32\n\
 	mov r32 = r12\n\
+	.save rp, r33\n\
 	mov r33 = b0\n\
+	.body\n\
 	adds r12 = -16, r12\n\
 	;;\n\
-	.align 16\n\
 	.endp _fini#\n\
 \n\
 /*@_fini_PROLOG_ENDS*/\n\
@@ -106,3 +128,5 @@ _fini:\n\
 /*@TRAILER_BEGINS*/\n\
 	.weak	__gmon_start__#\n\
 ");
+
+#endif