Blame SOURCES/glibc-fedora-__libc_multiple_libcs.patch

29e444
From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
29e444
From: Andreas Schwab <schwab@redhat.com>
29e444
Date: Fri, 11 Jun 2010 11:04:11 +0200
29e444
Subject: [PATCH] Properly set __libc_multiple_libcs
29e444
29e444
* elf/rtld.c (_dl_starting_up): Always define.
29e444
(dl_main): Always set _dl_starting_up.
29e444
* elf/dl-support.c (_dl_starting_up): Always define.
29e444
* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
29e444
29e444
---
29e444
 ChangeLog        |    7 +++++++
29e444
 elf/dl-init.c    |    4 ----
29e444
 elf/dl-support.c |    2 --
29e444
 elf/rtld.c       |    4 ----
29e444
 4 files changed, 7 insertions(+), 10 deletions(-)
29e444
12745e
--- glibc-2.17-c758a686/elf/dl-init.c
12745e
+++ glibc-2.17-c758a686/elf/dl-init.c
29e444
@@ -23,11 +23,9 @@
29e444
 /* Type of the initializer.  */
29e444
 typedef void (*init_t) (int, char **, char **);
29e444
 
29e444
-#ifndef HAVE_INLINED_SYSCALLS
29e444
 /* Flag, nonzero during startup phase.  */
29e444
 extern int _dl_starting_up;
29e444
 extern int _dl_starting_up_internal attribute_hidden;
29e444
-#endif
29e444
 
29e444
 
29e444
 static void
29e444
@@ -132,9 +130,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
29e444
   while (i-- > 0)
29e444
     call_init (main_map->l_initfini[i], argc, argv, env);
29e444
 
29e444
-#ifndef HAVE_INLINED_SYSCALLS
29e444
   /* Finished starting up.  */
29e444
   INTUSE(_dl_starting_up) = 0;
29e444
-#endif
29e444
 }
29e444
 INTDEF (_dl_init)
12745e
--- glibc-2.17-c758a686/elf/dl-support.c
12745e
+++ glibc-2.17-c758a686/elf/dl-support.c
29e444
@@ -81,10 +81,8 @@ unsigned long long _dl_load_adds;
29e444
    create a fake scope containing nothing.  */
29e444
 struct r_scope_elem _dl_initial_searchlist;
29e444
 
29e444
-#ifndef HAVE_INLINED_SYSCALLS
29e444
 /* Nonzero during startup.  */
29e444
 int _dl_starting_up = 1;
29e444
-#endif
29e444
 
29e444
 /* Random data provided by the kernel.  */
29e444
 void *_dl_random;
12745e
--- glibc-2.17-c758a686/elf/rtld.c
12745e
+++ glibc-2.17-c758a686/elf/rtld.c
29e444
@@ -106,7 +106,6 @@ static struct audit_list
29e444
   struct audit_list *next;
29e444
 } *audit_list;
29e444
 
29e444
-#ifndef HAVE_INLINED_SYSCALLS
29e444
 /* Set nonzero during loading and initialization of executable and
29e444
    libraries, cleared before the executable's entry point runs.  This
29e444
    must not be initialized to nonzero, because the unused dynamic
29e444
@@ -116,7 +115,6 @@ static struct audit_list
29e444
    never be called.  */
29e444
 int _dl_starting_up = 0;
29e444
 INTVARDEF(_dl_starting_up)
29e444
-#endif
29e444
 
29e444
 /* This is the structure which defines all variables global to ld.so
29e444
    (except those which cannot be added for some reason).  */
29e444
@@ -929,10 +927,8 @@ dl_main (const ElfW(Phdr) *phdr,
29e444
   /* Process the environment variable which control the behaviour.  */
29e444
   process_envvars (&mode);
29e444
 
29e444
-#ifndef HAVE_INLINED_SYSCALLS
29e444
   /* Set up a flag which tells we are just starting.  */
29e444
   INTUSE(_dl_starting_up) = 1;
29e444
-#endif
29e444
 
29e444
   if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
29e444
     {