summary refs log tree commit diff
path: root/elf/soinit.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-27 20:18:02 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-27 20:18:02 +0000
commit3300816c38721bcddbbeb92de7fe44b90454bce6 (patch)
treecd35fe7dc0799f565c04122cc63054d4790d9041 /elf/soinit.c
parent78477e4843c34f2ad54d25975758c3342746d0cd (diff)
downloadglibc-3300816c38721bcddbbeb92de7fe44b90454bce6.tar.gz
glibc-3300816c38721bcddbbeb92de7fe44b90454bce6.tar.xz
glibc-3300816c38721bcddbbeb92de7fe44b90454bce6.zip
Update.
2000-04-27  Ulrich Drepper  <drepper@redhat.com>

	* elf/soinit.c (__libc_global_ctors): Call __pthread_initialize_minimal
	if this function is available.

	* sysdeps/i386/i486/atomicity.h (exchange_and_add): Use uint32_t for
	all values.

	<haible@clisp.cons.org>.
Diffstat (limited to 'elf/soinit.c')
-rw-r--r--elf/soinit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/elf/soinit.c b/elf/soinit.c
index 1dee73c3be..7db054e4d4 100644
--- a/elf/soinit.c
+++ b/elf/soinit.c
@@ -40,6 +40,9 @@ extern void __deregister_frame (const void *);
 # endif
 #endif
 
+/* We have to initialize the thread library at least if bit.  */
+extern void __pthread_initialize_minimal (void) __attribute__ ((weak));
+
 /* This function will be called from _init in init-first.c.  */
 void
 __libc_global_ctors (void)
@@ -48,6 +51,11 @@ __libc_global_ctors (void)
   run_hooks (__CTOR_LIST__);
 #ifdef HAVE_DWARF2_UNWIND_INFO
 # ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
+  /* Initialize the thread library at least a bit since the libgcc functions
+     are using thread functions if these are available.  */
+  if (__pthread_initialize_minimal)
+    __pthread_initialize_minimal ();
+
   {
     static struct object ob;
     __register_frame_info (__EH_FRAME_BEGIN__, &ob);