olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-fedora-__libc_multiple_libcs.patch

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