Blame SOURCES/glibc-fedora-__libc_multiple_libcs.patch

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