]> git.ipfire.org Git - ipfire-3.x.git/blob - glibc/patches/glibc-fedora-__libc_multiple_libcs.patch
glibc: Update to 2.21
[ipfire-3.x.git] / glibc / patches / glibc-fedora-__libc_multiple_libcs.patch
1 #
2 # Upstream discussions:
3 # https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
4 #
5 # Based on the following commit:
6 #
7 # From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
8 # From: Andreas Schwab <schwab@redhat.com>
9 # Date: Fri, 11 Jun 2010 11:04:11 +0200
10 # Subject: [PATCH] Properly set __libc_multiple_libcs
11 #
12 # * elf/rtld.c (_dl_starting_up): Always define.
13 # (dl_main): Always set _dl_starting_up.
14 # * elf/dl-support.c (_dl_starting_up): Always define.
15 # * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
16 #
17 # ---
18 # ChangeLog | 7 +++++++
19 # elf/dl-init.c | 4 ----
20 # elf/dl-support.c | 2 --
21 # elf/rtld.c | 4 ----
22 # 4 files changed, 7 insertions(+), 10 deletions(-)
23 #
24 diff -urN glibc-2.20-205-ga39208b/elf/dl-init.c glibc-2.20-205-ga39208b.mod/elf/dl-init.c
25 --- glibc-2.20-205-ga39208b/elf/dl-init.c 2014-11-21 16:08:32.744913590 -0500
26 +++ glibc-2.20-205-ga39208b.mod/elf/dl-init.c 2014-11-21 16:09:42.485708197 -0500
27 @@ -119,8 +119,6 @@
28 while (i-- > 0)
29 call_init (main_map->l_initfini[i], argc, argv, env);
30
31 -#ifndef HAVE_INLINED_SYSCALLS
32 /* Finished starting up. */
33 _dl_starting_up = 0;
34 -#endif
35 }
36 diff -urN glibc-2.20-205-ga39208b/elf/dl-support.c glibc-2.20-205-ga39208b.mod/elf/dl-support.c
37 --- glibc-2.20-205-ga39208b/elf/dl-support.c 2014-11-19 14:35:03.000000000 -0500
38 +++ glibc-2.20-205-ga39208b.mod/elf/dl-support.c 2014-11-21 16:09:54.829671843 -0500
39 @@ -118,10 +118,8 @@
40 .r_nlist = 1,
41 };
42
43 -#ifndef HAVE_INLINED_SYSCALLS
44 /* Nonzero during startup. */
45 int _dl_starting_up = 1;
46 -#endif
47
48 /* Random data provided by the kernel. */
49 void *_dl_random;
50 diff -urN glibc-2.20-205-ga39208b/elf/rtld.c glibc-2.20-205-ga39208b.mod/elf/rtld.c
51 --- glibc-2.20-205-ga39208b/elf/rtld.c 2014-11-21 16:08:32.745913587 -0500
52 +++ glibc-2.20-205-ga39208b.mod/elf/rtld.c 2014-11-21 16:09:05.614816785 -0500
53 @@ -107,7 +107,6 @@
54 struct audit_list *next;
55 } *audit_list;
56
57 -#ifndef HAVE_INLINED_SYSCALLS
58 /* Set nonzero during loading and initialization of executable and
59 libraries, cleared before the executable's entry point runs. This
60 must not be initialized to nonzero, because the unused dynamic
61 @@ -117,7 +116,6 @@
62 never be called. */
63 int _dl_starting_up = 0;
64 rtld_hidden_def (_dl_starting_up)
65 -#endif
66
67 /* This is the structure which defines all variables global to ld.so
68 (except those which cannot be added for some reason). */
69 @@ -776,10 +774,8 @@
70 /* Process the environment variable which control the behaviour. */
71 process_envvars (&mode);
72
73 -#ifndef HAVE_INLINED_SYSCALLS
74 /* Set up a flag which tells we are just starting. */
75 _dl_starting_up = 1;
76 -#endif
77
78 if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
79 {