Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 1 Oct 2002 00:05:23 +0000 (00:05 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 1 Oct 2002 00:05:23 +0000 (00:05 +0000)
2002-09-19  David Mosberger  <davidm@hpl.hp.com>

* sysdeps/ia64/dl-fptr.c (make_fdesc): Load address of "local" via
a 64-bit gp-relative address to enable binaries with large data
sections.

2002-09-30  Ulrich Drepper  <drepper@redhat.com>

* stdlib/cxa_finalize.c (__cxa_finalize): Call UNREGISTER_ATFORK
if it is defined.
* posix/Makefile (distribute): Add fork.h.
* sysdeps/generic/fork.h: New file.

ChangeLog
posix/Makefile
stdlib/cxa_finalize.c
sysdeps/generic/fork.h [new file with mode: 0644]
sysdeps/ia64/dl-fptr.c

index dadc425..e4e2ddb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2002-09-19  David Mosberger  <davidm@hpl.hp.com>
+
+       * sysdeps/ia64/dl-fptr.c (make_fdesc): Load address of "local" via
+       a 64-bit gp-relative address to enable binaries with large data
+       sections.
+
+2002-09-30  Ulrich Drepper  <drepper@redhat.com>
+
+       * stdlib/cxa_finalize.c (__cxa_finalize): Call UNREGISTER_ATFORK
+       if it is defined.
+       * posix/Makefile (distribute): Add fork.h.
+       * sysdeps/generic/fork.h: New file.
+
 2002-09-29  Bruno Haible  <bruno@clisp.org>
 
        * sysdeps/generic/utmp_file.c (LOCKING_FAILED): New macro.
index 272e1ce..aebd8b3 100644 (file)
@@ -33,7 +33,7 @@ distribute := confstr.h TESTS TESTS2C.sed testcases.h \
              PTESTS PTESTS2C.sed ptestcases.h \
              globtest.c globtest.sh wordexp-tst.sh annexc.c fnmatch_loop.c   \
              spawn_int.h tst-getconf.sh regcomp.c regexec.c regex_internal.c \
-             regex_internal.h
+             regex_internal.h fork.h
 
 routines :=                                                                  \
        uname                                                                 \
index d9ed955..e42f6bd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <atomicity.h>
 #include "exit.h"
+#include <fork.h>
 
 /* If D is non-NULL, call all functions registered with `__cxa_atexit'
    with the same dso handle.  Otherwise, if D is NULL, do nothing.  */
@@ -41,4 +42,9 @@ __cxa_finalize (void *d)
            && compare_and_swap (&f->flavor, ef_cxa, ef_free))
          (*f->func.cxa.fn) (f->func.cxa.arg, 0);
     }
+
+  /* Remove the registered fork handlers.  */
+#ifdef UNREGISTER_ATFORK
+  UNREGISTER_ATFORK (d);
+#endif
 }
diff --git a/sysdeps/generic/fork.h b/sysdeps/generic/fork.h
new file mode 100644 (file)
index 0000000..623cae2
--- /dev/null
@@ -0,0 +1,8 @@
+/* Stub version of header for fork handling.  Mainly to handle pthread_atfork
+   and friends.  Outside dependencies:
+
+   UNREGISTER_ATFORK
+     If defined it must expand to a function call which takes one void*
+     parameter which is the DSO handle for the DSO which gets unloaded.
+     The function so called has to remove the atfork handlers registered
+     by this module.  */
index dd8eb9d..809e113 100644 (file)
@@ -1,5 +1,5 @@
 /* Manage function descriptors.  IA-64 version.
-   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -127,7 +127,7 @@ make_fdesc (Elf64_Addr ip, Elf64_Addr gp)
   unsigned int old;
   struct local *l;
 
-  asm ("addl %0 = @gprel (local), gp" : "=r" (l));
+  asm ("movl %0 = @gprel (local);; add %0 = %0, gp" : "=&r"(l));
 
   t = l->root;
   while (1)