Blame SOURCES/glibc-fedora-__libc_multiple_libcs.patch

50f89d
Short description: Cleanup use of _dl_starting_up.
50f89d
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
50f89d
Origin: PATCH
50f89d
Upstream status: https://sourceware.org/ml/libc-alpha/2014-02/msg00589.html
50f89d
50f89d
Upstream discussions:
50f89d
https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
50f89d
50f89d
Based on the following commit:
50f89d
~~~
50f89d
From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
50f89d
From: Andreas Schwab <schwab@redhat.com>
50f89d
Date: Fri, 11 Jun 2010 11:04:11 +0200
50f89d
Subject: [PATCH] Properly set __libc_multiple_libcs
50f89d
50f89d
	* elf/rtld.c (_dl_starting_up): Always define.
50f89d
	(dl_main): Always set _dl_starting_up.
50f89d
	* elf/dl-support.c (_dl_starting_up): Always define.
50f89d
	* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
50f89d
50f89d
---
50f89d
ChangeLog        |    7 +++++++
50f89d
elf/dl-init.c    |    4 ----
50f89d
elf/dl-support.c |    2 --
50f89d
elf/rtld.c       |    4 ----
50f89d
4 files changed, 7 insertions(+), 10 deletions(-)
50f89d
~~~
50f89d
50f89d
This patch needs to go upstream to get cleaned up, but has always involed
50f89d
analysis of the GNU/Hurd parts of the change and that stalled out, but
50f89d
perhaps with build-many-glibcs we can now test these changes more easily.
50f89d
50f89d
Index: b/elf/dl-init.c
50f89d
===================================================================
50f89d
--- a/elf/dl-init.c
50f89d
+++ b/elf/dl-init.c
50f89d
@@ -119,8 +119,6 @@ _dl_init (struct link_map *main_map, int
50f89d
   while (i-- > 0)
50f89d
     call_init (main_map->l_initfini[i], argc, argv, env);
50f89d
 
50f89d
-#ifndef HAVE_INLINED_SYSCALLS
50f89d
   /* Finished starting up.  */
50f89d
   _dl_starting_up = 0;
50f89d
-#endif
50f89d
 }
50f89d
Index: b/elf/dl-support.c
50f89d
===================================================================
50f89d
--- a/elf/dl-support.c
50f89d
+++ b/elf/dl-support.c
50f89d
@@ -117,10 +117,8 @@ struct r_scope_elem _dl_initial_searchli
50f89d
     .r_nlist = 1,
50f89d
   };
50f89d
 
50f89d
-#ifndef HAVE_INLINED_SYSCALLS
50f89d
 /* Nonzero during startup.  */
50f89d
 int _dl_starting_up = 1;
50f89d
-#endif
50f89d
 
50f89d
 /* Random data provided by the kernel.  */
50f89d
 void *_dl_random;
50f89d
Index: b/elf/rtld.c
50f89d
===================================================================
50f89d
--- a/elf/rtld.c
50f89d
+++ b/elf/rtld.c
50f89d
@@ -214,7 +214,6 @@ audit_list_iter_next (struct audit_list_
50f89d
   return iter->previous->name;
50f89d
 }
50f89d
 
50f89d
-#ifndef HAVE_INLINED_SYSCALLS
50f89d
 /* Set nonzero during loading and initialization of executable and
50f89d
    libraries, cleared before the executable's entry point runs.  This
50f89d
    must not be initialized to nonzero, because the unused dynamic
50f89d
@@ -224,7 +223,6 @@ audit_list_iter_next (struct audit_list_
50f89d
    never be called.  */
50f89d
 int _dl_starting_up = 0;
50f89d
 rtld_hidden_def (_dl_starting_up)
50f89d
-#endif
50f89d
 
50f89d
 /* This is the structure which defines all variables global to ld.so
50f89d
    (except those which cannot be added for some reason).  */
50f89d
@@ -898,10 +896,8 @@ dl_main (const ElfW(Phdr) *phdr,
50f89d
   /* Process the environment variable which control the behaviour.  */
50f89d
   process_envvars (&mode);
50f89d
 
50f89d
-#ifndef HAVE_INLINED_SYSCALLS
50f89d
   /* Set up a flag which tells we are just starting.  */
50f89d
   _dl_starting_up = 1;
50f89d
-#endif
50f89d
 
50f89d
   if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
50f89d
     {