|
|
00db10 |
From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
|
|
|
00db10 |
From: Andreas Schwab <schwab@redhat.com>
|
|
|
00db10 |
Date: Fri, 11 Jun 2010 11:04:11 +0200
|
|
|
00db10 |
Subject: [PATCH] Properly set __libc_multiple_libcs
|
|
|
00db10 |
|
|
|
00db10 |
* elf/rtld.c (_dl_starting_up): Always define.
|
|
|
00db10 |
(dl_main): Always set _dl_starting_up.
|
|
|
00db10 |
* elf/dl-support.c (_dl_starting_up): Always define.
|
|
|
00db10 |
* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
|
|
|
00db10 |
|
|
|
00db10 |
---
|
|
|
00db10 |
ChangeLog | 7 +++++++
|
|
|
00db10 |
elf/dl-init.c | 4 ----
|
|
|
00db10 |
elf/dl-support.c | 2 --
|
|
|
00db10 |
elf/rtld.c | 4 ----
|
|
|
00db10 |
4 files changed, 7 insertions(+), 10 deletions(-)
|
|
|
00db10 |
|
|
|
00db10 |
--- glibc-2.17-c758a686/elf/dl-init.c
|
|
|
00db10 |
+++ glibc-2.17-c758a686/elf/dl-init.c
|
|
|
00db10 |
@@ -23,11 +23,9 @@
|
|
|
00db10 |
/* Type of the initializer. */
|
|
|
00db10 |
typedef void (*init_t) (int, char **, char **);
|
|
|
00db10 |
|
|
|
00db10 |
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
00db10 |
/* Flag, nonzero during startup phase. */
|
|
|
00db10 |
extern int _dl_starting_up;
|
|
|
00db10 |
extern int _dl_starting_up_internal attribute_hidden;
|
|
|
00db10 |
-#endif
|
|
|
00db10 |
|
|
|
00db10 |
|
|
|
00db10 |
static void
|
|
|
00db10 |
@@ -132,9 +130,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
|
|
|
00db10 |
while (i-- > 0)
|
|
|
00db10 |
call_init (main_map->l_initfini[i], argc, argv, env);
|
|
|
00db10 |
|
|
|
00db10 |
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
00db10 |
/* Finished starting up. */
|
|
|
00db10 |
INTUSE(_dl_starting_up) = 0;
|
|
|
00db10 |
-#endif
|
|
|
00db10 |
}
|
|
|
00db10 |
INTDEF (_dl_init)
|
|
|
00db10 |
--- glibc-2.17-c758a686/elf/dl-support.c
|
|
|
00db10 |
+++ glibc-2.17-c758a686/elf/dl-support.c
|
|
|
00db10 |
@@ -81,10 +81,8 @@ unsigned long long _dl_load_adds;
|
|
|
00db10 |
create a fake scope containing nothing. */
|
|
|
00db10 |
struct r_scope_elem _dl_initial_searchlist;
|
|
|
00db10 |
|
|
|
00db10 |
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
00db10 |
/* Nonzero during startup. */
|
|
|
00db10 |
int _dl_starting_up = 1;
|
|
|
00db10 |
-#endif
|
|
|
00db10 |
|
|
|
00db10 |
/* Random data provided by the kernel. */
|
|
|
00db10 |
void *_dl_random;
|
|
|
00db10 |
--- glibc-2.17-c758a686/elf/rtld.c
|
|
|
00db10 |
+++ glibc-2.17-c758a686/elf/rtld.c
|
|
|
00db10 |
@@ -106,7 +106,6 @@ static struct audit_list
|
|
|
00db10 |
struct audit_list *next;
|
|
|
00db10 |
} *audit_list;
|
|
|
00db10 |
|
|
|
00db10 |
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
00db10 |
/* Set nonzero during loading and initialization of executable and
|
|
|
00db10 |
libraries, cleared before the executable's entry point runs. This
|
|
|
00db10 |
must not be initialized to nonzero, because the unused dynamic
|
|
|
00db10 |
@@ -116,7 +115,6 @@ static struct audit_list
|
|
|
00db10 |
never be called. */
|
|
|
00db10 |
int _dl_starting_up = 0;
|
|
|
00db10 |
INTVARDEF(_dl_starting_up)
|
|
|
00db10 |
-#endif
|
|
|
00db10 |
|
|
|
00db10 |
/* This is the structure which defines all variables global to ld.so
|
|
|
00db10 |
(except those which cannot be added for some reason). */
|
|
|
00db10 |
@@ -929,10 +927,8 @@ dl_main (const ElfW(Phdr) *phdr,
|
|
|
00db10 |
/* Process the environment variable which control the behaviour. */
|
|
|
00db10 |
process_envvars (&mode);
|
|
|
00db10 |
|
|
|
00db10 |
-#ifndef HAVE_INLINED_SYSCALLS
|
|
|
00db10 |
/* Set up a flag which tells we are just starting. */
|
|
|
00db10 |
INTUSE(_dl_starting_up) = 1;
|
|
|
00db10 |
-#endif
|
|
|
00db10 |
|
|
|
00db10 |
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
|
|
|
00db10 |
{
|