Blame SOURCES/glibc-fedora-__libc_multiple_libcs.patch

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