about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-25 16:48:42 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-25 16:48:42 +0000
commit7045878b042789db21af0c4f3254ce1a331420a8 (patch)
tree521f53faf21d17b0cd17006b43c8bcc3b8c3ecbb
parentb7fb789d886d1b1c9ce9c437b17b63b2e071bb06 (diff)
downloadglibc-7045878b042789db21af0c4f3254ce1a331420a8.tar.gz
glibc-7045878b042789db21af0c4f3254ce1a331420a8.tar.xz
glibc-7045878b042789db21af0c4f3254ce1a331420a8.zip
Update.
	* elf/dl-close.c (_dl_close): Don't run destructors of objects
	marked DF_1_NODELETE.
-rw-r--r--ChangeLog3
-rw-r--r--elf/dl-close.c1
-rw-r--r--linuxthreads/ChangeLog2
-rw-r--r--linuxthreads/pthread.c7
4 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3cbcca9d37..b63e3d29bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
 
+	* elf/dl-close.c (_dl_close): Don't run destructors of objects
+	marked DF_1_NODELETE.
+
 	* sysdeps/posix/system.c (__libc_system): We cannot use vfork here
 	since we call sigaction in the child.
 
diff --git a/elf/dl-close.c b/elf/dl-close.c
index cbbb2ae298..58a84b5bfc 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -80,6 +80,7 @@ _dl_close (void *_map)
       struct link_map *imap = map->l_initfini[i];
       if (imap->l_opencount == 1 && imap->l_type == lt_loaded
 	  && (imap->l_info[DT_FINI] || imap->l_info[DT_FINI_ARRAY])
+	  && ! (list[i]->l_flags_1 & DF_1_NODELETE)
 	  /* Skip any half-cooked objects that were never initialized.  */
 	  && imap->l_init_called)
 	{
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 36e0de47b9..7b3e50e7f6 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,5 +1,7 @@
 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
 
+	* pthread.c (pthread_exit_process): Move thread_self us inside `if'.
+
 	* sysdeps/pthread/pthread.h
 	(PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
 	(PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index 646a0049b7..628b0cea17 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -1,3 +1,4 @@
+
 /* Linuxthreads - a simple clone()-based implementation of Posix        */
 /* threads for Linux.                                                   */
 /* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr)              */
@@ -724,10 +725,10 @@ weak_alias (__pthread_yield, pthread_yield)
 
 static void pthread_exit_process(int retcode, void *arg)
 {
-  struct pthread_request request;
-  pthread_descr self = thread_self();
-
   if (__builtin_expect (__pthread_manager_request, 0) >= 0) {
+    struct pthread_request request;
+    pthread_descr self = thread_self();
+
     request.req_thread = self;
     request.req_kind = REQ_PROCESS_EXIT;
     request.req_args.exit.code = retcode;