2014-11-24 14:58:08 +00:00
|
|
|
#
|
|
|
|
# Upstream discussions:
|
|
|
|
# https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
|
|
|
|
#
|
|
|
|
# Based on the following commit:
|
|
|
|
#
|
|
|
|
# From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
|
|
|
|
# From: Andreas Schwab <schwab@redhat.com>
|
|
|
|
# Date: Fri, 11 Jun 2010 11:04:11 +0200
|
|
|
|
# Subject: [PATCH] Properly set __libc_multiple_libcs
|
|
|
|
#
|
|
|
|
# * elf/rtld.c (_dl_starting_up): Always define.
|
|
|
|
# (dl_main): Always set _dl_starting_up.
|
|
|
|
# * elf/dl-support.c (_dl_starting_up): Always define.
|
|
|
|
# * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
|
|
|
|
#
|
|
|
|
# ---
|
|
|
|
# ChangeLog | 7 +++++++
|
|
|
|
# elf/dl-init.c | 4 ----
|
|
|
|
# elf/dl-support.c | 2 --
|
|
|
|
# elf/rtld.c | 4 ----
|
|
|
|
# 4 files changed, 7 insertions(+), 10 deletions(-)
|
|
|
|
#
|
|
|
|
diff -urN glibc-2.20-205-ga39208b/elf/dl-init.c glibc-2.20-205-ga39208b.mod/elf/dl-init.c
|
|
|
|
--- glibc-2.20-205-ga39208b/elf/dl-init.c 2014-11-21 16:08:32.744913590 -0500
|
|
|
|
+++ glibc-2.20-205-ga39208b.mod/elf/dl-init.c 2014-11-21 16:09:42.485708197 -0500
|
|
|
|
@@ -119,8 +119,6 @@
|
2012-08-20 19:25:02 +00:00
|
|
|
while (i-- > 0)
|
|
|
|
call_init (main_map->l_initfini[i], argc, argv, env);
|
|
|
|
|
|
|
|
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
|
/* Finished starting up. */
|
2014-11-24 14:58:08 +00:00
|
|
|
_dl_starting_up = 0;
|
2012-08-20 19:25:02 +00:00
|
|
|
-#endif
|
|
|
|
}
|
2014-11-24 14:58:08 +00:00
|
|
|
diff -urN glibc-2.20-205-ga39208b/elf/dl-support.c glibc-2.20-205-ga39208b.mod/elf/dl-support.c
|
|
|
|
--- glibc-2.20-205-ga39208b/elf/dl-support.c 2014-11-19 14:35:03.000000000 -0500
|
|
|
|
+++ glibc-2.20-205-ga39208b.mod/elf/dl-support.c 2014-11-21 16:09:54.829671843 -0500
|
|
|
|
@@ -118,10 +118,8 @@
|
2013-07-09 17:45:48 +00:00
|
|
|
.r_nlist = 1,
|
|
|
|
};
|
2012-08-20 19:25:02 +00:00
|
|
|
|
|
|
|
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
|
/* Nonzero during startup. */
|
|
|
|
int _dl_starting_up = 1;
|
|
|
|
-#endif
|
|
|
|
|
|
|
|
/* Random data provided by the kernel. */
|
|
|
|
void *_dl_random;
|
2014-11-24 14:58:08 +00:00
|
|
|
diff -urN glibc-2.20-205-ga39208b/elf/rtld.c glibc-2.20-205-ga39208b.mod/elf/rtld.c
|
|
|
|
--- glibc-2.20-205-ga39208b/elf/rtld.c 2014-11-21 16:08:32.745913587 -0500
|
|
|
|
+++ glibc-2.20-205-ga39208b.mod/elf/rtld.c 2014-11-21 16:09:05.614816785 -0500
|
|
|
|
@@ -107,7 +107,6 @@
|
2012-08-20 19:25:02 +00:00
|
|
|
struct audit_list *next;
|
|
|
|
} *audit_list;
|
|
|
|
|
|
|
|
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
|
/* Set nonzero during loading and initialization of executable and
|
|
|
|
libraries, cleared before the executable's entry point runs. This
|
|
|
|
must not be initialized to nonzero, because the unused dynamic
|
2014-11-24 14:58:08 +00:00
|
|
|
@@ -117,7 +116,6 @@
|
2012-08-20 19:25:02 +00:00
|
|
|
never be called. */
|
|
|
|
int _dl_starting_up = 0;
|
2014-11-24 14:58:08 +00:00
|
|
|
rtld_hidden_def (_dl_starting_up)
|
2012-08-20 19:25:02 +00:00
|
|
|
-#endif
|
|
|
|
|
|
|
|
/* This is the structure which defines all variables global to ld.so
|
|
|
|
(except those which cannot be added for some reason). */
|
2014-11-24 14:58:08 +00:00
|
|
|
@@ -776,10 +774,8 @@
|
2012-08-20 19:25:02 +00:00
|
|
|
/* Process the environment variable which control the behaviour. */
|
|
|
|
process_envvars (&mode);
|
|
|
|
|
|
|
|
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
|
/* Set up a flag which tells we are just starting. */
|
2014-11-24 14:58:08 +00:00
|
|
|
_dl_starting_up = 1;
|
2012-08-20 19:25:02 +00:00
|
|
|
-#endif
|
|
|
|
|
|
|
|
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
|
|
|
|
{
|