Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 5 Mar 2004 11:25:26 +0000 (11:25 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 5 Mar 2004 11:25:26 +0000 (11:25 +0000)
* sysdeps/generic/ldsodefs.h (struct rtld_global): Move
dl_debug_fd to rtld_global_ro.
* elf/rtld.c: Use GLRO instead of GL for dl_debug_fd.
* elf/dl-misc.c: Likewise.

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

index 6c11f1e..5e1a0cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/generic/ldsodefs.h (struct rtld_global): Move
+       dl_debug_fd to rtld_global_ro.
+       * elf/rtld.c: Use GLRO instead of GL for dl_debug_fd.
+       * elf/dl-misc.c: Likewise.
+
        * malloc/malloc.c: Don't call exported interface in the implementation.
 
        * include/wctype.h: Add libc_hidden_proto for __towctrans.
index c5209fb..9b29bcf 100644 (file)
@@ -276,7 +276,7 @@ _dl_debug_printf (const char *fmt, ...)
   va_list arg;
 
   va_start (arg, fmt);
-  _dl_debug_vdprintf (GL(dl_debug_fd), 1, fmt, arg);
+  _dl_debug_vdprintf (GLRO(dl_debug_fd), 1, fmt, arg);
   va_end (arg);
 }
 INTDEF(_dl_debug_printf)
@@ -289,7 +289,7 @@ _dl_debug_printf_c (const char *fmt, ...)
   va_list arg;
 
   va_start (arg, fmt);
-  _dl_debug_vdprintf (GL(dl_debug_fd), -1, fmt, arg);
+  _dl_debug_vdprintf (GLRO(dl_debug_fd), -1, fmt, arg);
   va_end (arg);
 }
 
index 943901f..c0e15a6 100644 (file)
@@ -94,7 +94,6 @@ struct rtld_global _rtld_global =
   {
     /* Get architecture specific initializer.  */
 #include <dl-procinfo.c>
-    ._dl_debug_fd = STDERR_FILENO,
     /* Default presumption without further information is executable stack.  */
     ._dl_stack_flags = PF_R|PF_W|PF_X,
 #ifdef _LIBC_REENTRANT
@@ -116,6 +115,7 @@ struct rtld_global_ro _rtld_global_ro attribute_relro =
 #ifdef NEED_DL_SYSINFO
     ._dl_sysinfo = DL_SYSINFO_DEFAULT,
 #endif
+    ._dl_debug_fd = STDERR_FILENO,
     ._dl_use_load_bias = -2,
     ._dl_correct_cache_id = _DL_CACHE_DEFAULT_ID,
     ._dl_hwcap_mask = HWCAP_IMPORTANT,
@@ -2190,10 +2190,10 @@ process_envvars (enum mode *modep)
       *--startp = '.';
       startp = memcpy (startp - name_len, debug_output, name_len);
 
-      GL(dl_debug_fd) = __open (startp, flags, DEFFILEMODE);
-      if (GL(dl_debug_fd) == -1)
+      GLRO(dl_debug_fd) = __open (startp, flags, DEFFILEMODE);
+      if (GLRO(dl_debug_fd) == -1)
        /* We use standard output if opening the file failed.  */
-       GL(dl_debug_fd) = STDOUT_FILENO;
+       GLRO(dl_debug_fd) = STDOUT_FILENO;
     }
 }
 
index 5d253e4..98294cb 100644 (file)
@@ -259,9 +259,6 @@ struct rtld_global
   EXTERN struct r_search_path_elem *_dl_all_dirs;
   EXTERN struct r_search_path_elem *_dl_init_all_dirs;
 
-  /* File descriptor to write debug messages to.  */
-  EXTERN int _dl_debug_fd;
-
 #ifdef _LIBC_REENTRANT
   EXTERN void **(*_dl_error_catch_tsd) (void) __attribute__ ((const));
 #endif
@@ -395,6 +392,9 @@ struct rtld_global_ro
   /* If nonzero print warnings messages.  */
   EXTERN int _dl_verbose;
 
+  /* File descriptor to write debug messages to.  */
+  EXTERN int _dl_debug_fd;
+
   /* Do we do lazy relocations?  */
   EXTERN int _dl_lazy;