2002-10-24 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@gnu.org>
Thu, 24 Oct 2002 19:13:38 +0000 (19:13 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 24 Oct 2002 19:13:38 +0000 (19:13 +0000)
* sysdeps/generic/ldsodefs.h (_dl_starting_up): Declare it here.
* sysdeps/unix/sysv/linux/init-first.c: Not here.
* sysdeps/powerpc/elf/libc-start.c: Or here.
* sysdeps/unix/sysv/aix/libc-start.c: Or here.
* sysdeps/unix/sysv/aix/start-libc.c: Or here.
* sysdeps/unix/sysv/aix/init-first.c: Or here.
* sysdeps/generic/libc-start.c: Or here.
* sysdeps/unix/sysv/linux/init-first.c (init): Protect _dl_starting_up
access with [! SHARED].
* sysdeps/unix/sysv/aix/init-first.c (init): Likewise.

sysdeps/unix/sysv/aix/init-first.c
sysdeps/unix/sysv/aix/libc-start.c
sysdeps/unix/sysv/aix/start-libc.c

index 4c6768b..8272a62 100644 (file)
@@ -37,9 +37,6 @@ extern void __libc_init (int, char **, char **);
 /* The function is called from assembly stubs the compiler can't see.  */
 static void init (int, char **, char **) __attribute__ ((unused));
 
-extern int _dl_starting_up;
-weak_extern (_dl_starting_up)
-
 /* Set nonzero if we have to be prepared for more then one libc being
    used in the process.  Safe assumption if initializer never runs.  */
 int __libc_multiple_libcs attribute_hidden = 1;
@@ -60,10 +57,12 @@ init (int argc, char **argv, char **envp)
      If the address would be taken inside the expression the optimizer
      would try to be too smart and throws it away.  Grrr.  */
 
+#ifndef SHARED
   /* XXX disable dl for now
   int *dummy_addr = &_dl_starting_up;
 
   __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */
+#endif
 
   /* Save the command-line arguments.  */
   __libc_argc = argc;
index 757b349..813e28d 100644 (file)
@@ -31,8 +31,6 @@ typedef unsigned char uchar;
 extern void __libc_init_first (int argc, char **argv, char **envp);
 
 /* XXX disable for now
-extern int _dl_starting_up;
-weak_extern (_dl_starting_up)
 extern int __libc_multiple_libcs; */
 
 /* XXX normally defined in generic/dl-sydep.c, hack it into existance
index 303caa7..0cbe79d 100644 (file)
@@ -31,8 +31,6 @@ typedef unsigned char uchar;
 extern void __libc_init_first (int argc, char **argv, char **envp);
 
 /* XXX disable for now
-extern int _dl_starting_up;
-weak_extern (_dl_starting_up)
 extern int __libc_multiple_libcs; */
 
 /* XXX normally defined in generic/dl-sydep.c, hack it into existance