|
|
ce126e1 |
#
|
|
|
ce126e1 |
# Upstream discussions:
|
|
|
ce126e1 |
# https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
|
|
|
ce126e1 |
#
|
|
|
ce126e1 |
# Based on the following commit:
|
|
|
ce126e1 |
#
|
|
|
ce126e1 |
# From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
|
|
|
ce126e1 |
# From: Andreas Schwab <schwab@redhat.com>
|
|
|
ce126e1 |
# Date: Fri, 11 Jun 2010 11:04:11 +0200
|
|
|
ce126e1 |
# Subject: [PATCH] Properly set __libc_multiple_libcs
|
|
|
ce126e1 |
#
|
|
|
ce126e1 |
# * elf/rtld.c (_dl_starting_up): Always define.
|
|
|
ce126e1 |
# (dl_main): Always set _dl_starting_up.
|
|
|
ce126e1 |
# * elf/dl-support.c (_dl_starting_up): Always define.
|
|
|
ce126e1 |
# * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
|
|
|
ce126e1 |
#
|
|
|
ce126e1 |
# ---
|
|
|
ce126e1 |
# ChangeLog | 7 +++++++
|
|
|
ce126e1 |
# elf/dl-init.c | 4 ----
|
|
|
ce126e1 |
# elf/dl-support.c | 2 --
|
|
|
ce126e1 |
# elf/rtld.c | 4 ----
|
|
|
ce126e1 |
# 4 files changed, 7 insertions(+), 10 deletions(-)
|
|
|
ce126e1 |
#
|
|
|
a2f7bb7 |
Index: b/elf/dl-init.c
|
|
|
a2f7bb7 |
===================================================================
|
|
|
a2f7bb7 |
--- a/elf/dl-init.c
|
|
|
a2f7bb7 |
+++ b/elf/dl-init.c
|
|
|
a2f7bb7 |
@@ -119,8 +119,6 @@ _dl_init (struct link_map *main_map, int
|
|
|
fb633ea |
while (i-- > 0)
|
|
|
fb633ea |
call_init (main_map->l_initfini[i], argc, argv, env);
|
|
|
fb633ea |
|
|
|
fb633ea |
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
fb633ea |
/* Finished starting up. */
|
|
|
ce126e1 |
_dl_starting_up = 0;
|
|
|
fb633ea |
-#endif
|
|
|
fb633ea |
}
|
|
|
a2f7bb7 |
Index: b/elf/dl-support.c
|
|
|
a2f7bb7 |
===================================================================
|
|
|
a2f7bb7 |
--- a/elf/dl-support.c
|
|
|
a2f7bb7 |
+++ b/elf/dl-support.c
|
|
|
a2f7bb7 |
@@ -117,10 +117,8 @@ struct r_scope_elem _dl_initial_searchli
|
|
Siddhesh Poyarekar |
9d560ee |
.r_nlist = 1,
|
|
Siddhesh Poyarekar |
9d560ee |
};
|
|
|
fb633ea |
|
|
|
fb633ea |
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
fb633ea |
/* Nonzero during startup. */
|
|
|
fb633ea |
int _dl_starting_up = 1;
|
|
|
fb633ea |
-#endif
|
|
|
fb633ea |
|
|
|
fb633ea |
/* Random data provided by the kernel. */
|
|
|
fb633ea |
void *_dl_random;
|
|
|
a2f7bb7 |
Index: b/elf/rtld.c
|
|
|
a2f7bb7 |
===================================================================
|
|
|
a2f7bb7 |
--- a/elf/rtld.c
|
|
|
a2f7bb7 |
+++ b/elf/rtld.c
|
|
|
a2f7bb7 |
@@ -214,7 +214,6 @@ audit_list_iter_next (struct audit_list_
|
|
|
a2f7bb7 |
return iter->previous->name;
|
|
|
a2f7bb7 |
}
|
|
|
fb633ea |
|
|
|
fb633ea |
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
fb633ea |
/* Set nonzero during loading and initialization of executable and
|
|
|
fb633ea |
libraries, cleared before the executable's entry point runs. This
|
|
|
fb633ea |
must not be initialized to nonzero, because the unused dynamic
|
|
|
a2f7bb7 |
@@ -224,7 +223,6 @@ audit_list_iter_next (struct audit_list_
|
|
|
fb633ea |
never be called. */
|
|
|
fb633ea |
int _dl_starting_up = 0;
|
|
|
ce126e1 |
rtld_hidden_def (_dl_starting_up)
|
|
|
fb633ea |
-#endif
|
|
|
fb633ea |
|
|
|
fb633ea |
/* This is the structure which defines all variables global to ld.so
|
|
|
fb633ea |
(except those which cannot be added for some reason). */
|
|
|
a2f7bb7 |
@@ -898,10 +896,8 @@ dl_main (const ElfW(Phdr) *phdr,
|
|
|
fb633ea |
/* Process the environment variable which control the behaviour. */
|
|
|
fb633ea |
process_envvars (&mode);
|
|
|
fb633ea |
|
|
|
fb633ea |
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
fb633ea |
/* Set up a flag which tells we are just starting. */
|
|
|
ce126e1 |
_dl_starting_up = 1;
|
|
|
fb633ea |
-#endif
|
|
|
fb633ea |
|
|
|
fb633ea |
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
|
|
|
fb633ea |
{
|