]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 23 Feb 2002 07:59:56 +0000 (07:59 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 23 Feb 2002 07:59:56 +0000 (07:59 +0000)
2002-02-22  Ulrich Drepper  <drepper@redhat.com>

* elf/Versions: Add _dl_allocate_tls and _dl_deallocate_tls.
* elf/rtld.c (dl_main): Use _dl_allocate_tls with INTUSE.
* sysdeps/generic/dl-tls.c: Add INTDEF for _dl_allocate_tls.
(_dl_deallocate_tls): New function.
* sysdeps/generic/ldsodefs.h: Declare _dl_allocate_tls_internal and
_dl_deallocate_tls.

ChangeLog
elf/Versions
elf/rtld.c
sysdeps/generic/dl-tls.c
sysdeps/generic/ldsodefs.h

index 0cd1271d5c3a4ab9c68c0a1c21ec6c9a48acb201..41d839c8b41cd3134d47c0a7e218c281a3c08478 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-02-22  Ulrich Drepper  <drepper@redhat.com>
+
+       * elf/Versions: Add _dl_allocate_tls and _dl_deallocate_tls.
+       * elf/rtld.c (dl_main): Use _dl_allocate_tls with INTUSE.
+       * sysdeps/generic/dl-tls.c: Add INTDEF for _dl_allocate_tls.
+       (_dl_deallocate_tls): New function.
+       * sysdeps/generic/ldsodefs.h: Declare _dl_allocate_tls_internal and
+       _dl_deallocate_tls.
+
 2002-02-21  Jakub Jelinek  <jakub@redhat.com>
 
        * libio/fileops.c (_IO_file_seekoff_mmap): Fix fseek SEEK_END.
index 927e26ff462dd72baa58e6686e0aab008a0e27a7..37d11d87b9495a53befa16318537fc70a8ac37d8 100644 (file)
@@ -49,6 +49,6 @@ ld {
     _dl_map_object; _dl_map_object_deps; _dl_out_of_memory;
     _dl_relocate_object; _dl_signal_error; _dl_start_profile; _dl_starting_up;
     _dl_unload_cache;
-    _rtld_global; _dl_tls_symaddr;
+    _rtld_global; _dl_tls_symaddr; _dl_allocate_tls; _dl_deallocate_tls;
   }
 }
index d7653f23945137838685a6875422b56ff7c7027f..b926271590eb836db5507a026369d28cd241100f 100644 (file)
@@ -1240,7 +1240,7 @@ of this helper program; chances are you did not intend to run this program.\n\
         for the thread descriptor.  The memory for the TLS block will
         never be freed.  It should be allocated accordingly.  The dtv
         array can be changed if dynamic loading requires it.  */
-      tcbp = _dl_allocate_tls ();
+      tcbp = INTUSE(_dl_allocate_tls) ();
       if (tcbp == NULL)
        _dl_fatal_printf ("\
 cannot allocate TLS data structures for inital thread");
index 7e45850198719645766fc8adbdfd33729155f76c..b7ed69f934d279568c0c8478976d9eed6a111d56 100644 (file)
@@ -324,6 +324,21 @@ _dl_allocate_tls (void)
 
   return result;
 }
+INTDEF(_dl_allocate_tls)
+
+
+void
+internal_function
+_dl_deallocate_tls (void *tcb)
+{
+  dtv_t *dtv = GET_DTV (tcb);
+
+  /* The array starts with dtv[-1].  */
+  free (dtv - 1);
+
+  munmap (tcb, GL(dl_tls_static_size));
+}
+
 
 
 # ifdef SHARED
index d7221983289584d8a345fc3e2dfb3e05e5bdc6f9..779e4387531c97cf6a2bf07f241ba53a53bf809d 100644 (file)
@@ -688,6 +688,10 @@ extern void _dl_determine_tlsoffset (void) internal_function;
 
 /* Allocate memory for static TLS block and dtv.  */
 extern void *_dl_allocate_tls (void) internal_function;
+extern void *_dl_allocate_tls_internal (void) internal_function;
+
+/* Deallocate memory allocated with _dl_allocate_tls.  */
+extern void _dl_deallocate_tls (void *tcb) internal_function;
 
 /* Return the symbol address given the map of the module it is in and
    the symbol record.  */