2002-10-09 Roland McGrath <roland@redhat.com>
authorroland <roland>
Fri, 11 Oct 2002 10:51:53 +0000 (10:51 +0000)
committerroland <roland>
Fri, 11 Oct 2002 10:51:53 +0000 (10:51 +0000)
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07  Roland McGrath  <roland@redhat.com>

* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.

sysdeps/generic/ldsodefs.h

index c149656..36582a7 100644 (file)
@@ -34,6 +34,7 @@
 #include <sys/mman.h>
 #include <link.h>
 #include <dl-lookupcfg.h>
+#include <dl-sysdep.h>
 #include <bits/libc-lock.h>
 #include <hp-timing.h>
 #include <tls.h>
@@ -372,6 +373,10 @@ struct rtld_global
 
   /* Structure describing the dynamic linker itself.  */
   EXTERN struct link_map _dl_rtld_map;
+
+#ifdef _LIBC_REENTRANT
+  EXTERN void **(*_dl_error_catch_tsd) (void) __attribute__ ((const));
+#endif
 #ifdef SHARED
 };
 # define __rtld_global_attribute__