Blame SOURCES/glibc-fedora-__libc_multiple_libcs.patch

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