|
|
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 |
#
|
|
|
ce126e1 |
diff -urN glibc-2.20-205-ga39208b/elf/dl-init.c glibc-2.20-205-ga39208b.mod/elf/dl-init.c
|
|
|
ce126e1 |
--- glibc-2.20-205-ga39208b/elf/dl-init.c 2014-11-21 16:08:32.744913590 -0500
|
|
|
ce126e1 |
+++ glibc-2.20-205-ga39208b.mod/elf/dl-init.c 2014-11-21 16:09:42.485708197 -0500
|
|
|
ce126e1 |
@@ -119,8 +119,6 @@
|
|
|
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 |
}
|
|
|
ce126e1 |
diff -urN glibc-2.20-205-ga39208b/elf/dl-support.c glibc-2.20-205-ga39208b.mod/elf/dl-support.c
|
|
|
ce126e1 |
--- glibc-2.20-205-ga39208b/elf/dl-support.c 2014-11-19 14:35:03.000000000 -0500
|
|
|
ce126e1 |
+++ glibc-2.20-205-ga39208b.mod/elf/dl-support.c 2014-11-21 16:09:54.829671843 -0500
|
|
|
ce126e1 |
@@ -118,10 +118,8 @@
|
|
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;
|
|
|
ce126e1 |
diff -urN glibc-2.20-205-ga39208b/elf/rtld.c glibc-2.20-205-ga39208b.mod/elf/rtld.c
|
|
|
ce126e1 |
--- glibc-2.20-205-ga39208b/elf/rtld.c 2014-11-21 16:08:32.745913587 -0500
|
|
|
ce126e1 |
+++ glibc-2.20-205-ga39208b.mod/elf/rtld.c 2014-11-21 16:09:05.614816785 -0500
|
|
|
ce126e1 |
@@ -107,7 +107,6 @@
|
|
|
fb633ea |
struct audit_list *next;
|
|
|
fb633ea |
} *audit_list;
|
|
|
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
|
|
|
ce126e1 |
@@ -117,7 +116,6 @@
|
|
|
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). */
|
|
|
ce126e1 |
@@ -776,10 +774,8 @@
|
|
|
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 |
{
|