]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/glibc/glibc-rh862094.patch
Merge branch 'bird' into next
[ipfire-2.x.git] / src / patches / glibc / glibc-rh862094.patch
1 From bc5fb0374c3ce6eca92f44d13a55b066e707c4a0 Mon Sep 17 00:00:00 2001
2 From: Andreas Schwab <schwab@redhat.com>
3 Date: Wed, 15 Sep 2010 07:20:57 -0700
4 Subject: [PATCH] Don't try to free rpath strings allocated during startup
5
6 ---
7 ChangeLog | 10 ++++++++++
8 elf/dl-load.c | 3 ---
9 elf/dl-support.c | 3 +++
10 elf/rtld.c | 4 ++++
11 4 files changed, 17 insertions(+), 3 deletions(-)
12
13 2010-09-13 Andreas Schwab <schwab@redhat.com>
14 Ulrich Drepper <drepper@redhat.com>
15
16 * elf/rtld.c (dl_main): Set GLRO(dl_init_all_dirs) just before
17 re-relocationg ld.so.
18 * elf/dl-support.c (_dl_non_dynamic_init): And here after the
19 _dl_init_paths call.
20 * elf/dl-load.c (_dl_init_paths). Don't set GLRO(dl_init_all_dirs)
21 here anymore.
22
23 diff --git a/elf/dl-load.c b/elf/dl-load.c
24 index 0adddf5..a7162eb 100644
25 --- a/elf/dl-load.c
26 +++ b/elf/dl-load.c
27 @@ -787,9 +787,6 @@ _dl_init_paths (const char *llp)
28 }
29 else
30 env_path_list.dirs = (void *) -1;
31 -
32 - /* Remember the last search directory added at startup. */
33 - GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
34 }
35
36
37 diff --git a/elf/dl-support.c b/elf/dl-support.c
38 index f94d2c4..5897b32 100644
39 --- a/elf/dl-support.c
40 +++ b/elf/dl-support.c
41 @@ -264,6 +264,9 @@ _dl_non_dynamic_init (void)
42 objects. */
43 _dl_init_paths (getenv ("LD_LIBRARY_PATH"));
44
45 + /* Remember the last search directory added at startup. */
46 + _dl_init_all_dirs = GL(dl_all_dirs);
47 +
48 _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0';
49
50 _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0';
51 diff --git a/elf/rtld.c b/elf/rtld.c
52 index 90f3ff1..5ecc4fe 100644
53 --- a/elf/rtld.c
54 +++ b/elf/rtld.c
55 @@ -2291,6 +2291,10 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
56 lossage);
57 }
58
59 + /* Remember the last search directory added at startup, now that
60 + malloc will no longer be the one from dl-minimal.c. */
61 + GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
62 +
63 if (! prelinked && rtld_multiple_ref)
64 {
65 /* There was an explicit ref to the dynamic linker as a shared lib.
66 --
67 1.7.1
68