summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2011-11-16 15:50:23 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-24 22:12:03 +0000
commitd24f8aaf62b1f1e62c5bfb5640e7bcd291f32cf5 (patch)
treed5af7a189148804df0588884548d78ceabb3a24f /meta/recipes-core/eglibc
parent49c7815b6db58365601cf81fd55caa95d00c2cef (diff)
downloadpoky-d24f8aaf62b1f1e62c5bfb5640e7bcd291f32cf5.tar.gz
eglibc_2.13: update SRCREV
Update eglibc 2.13 SRCREV to 15508, just to sync with upstream Remove glibc_bug_fix_12454.patch, because it is already merged. (From OE-Core rev: e364b04a34d7c2a95145799773821e82b8677e78) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/eglibc')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/glibc_bug_fix_12454.patch179
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.13.bb5
2 files changed, 2 insertions, 182 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.13/glibc_bug_fix_12454.patch b/meta/recipes-core/eglibc/eglibc-2.13/glibc_bug_fix_12454.patch
deleted file mode 100644
index 71ba851773..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.13/glibc_bug_fix_12454.patch
+++ /dev/null
@@ -1,179 +0,0 @@
1Upstream-Status: Inappropriate [backport]
2
3Imported by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/12
4
5From 6b1e7d1992cd89032df431c0e0d1418b97e57cd8 Mon Sep 17 00:00:00 2001
6From: Ulrich Drepper <drepper@gmail.com>
7Date: Mon, 30 May 2011 12:31:25 -0400
8Subject: [PATCH] Handle DSOs without any dependency in ld.so
9
10---
11 ChangeLog | 6 ++++
12 NEWS | 4 +-
13 elf/dl-deps.c | 93 +++++++++++++++++++++++++++++---------------------------
14 elf/dl-fini.c | 10 ++++--
15 elf/rtld.c | 1 -
16 5 files changed, 62 insertions(+), 52 deletions(-)
17
18Index: libc/ChangeLog
19===================================================================
20--- libc.orig/ChangeLog
21+++ libc/ChangeLog
22@@ -1,3 +1,13 @@
23+2011-05-30 Ulrich Drepper <drepper@gmail.com>
24+
25+ [BZ #12454]
26+ * elf/dl-deps.c (_dl_map_object_deps): Run initializer sorting only
27+ when there are multiple maps.
28+ * elf/dl-fini.c (_dl_sort_fini): Check for list of one.
29+ (_dl_fini): Remove test here.
30+
31+ * elf/rtld.c (dl_main): Don't allow the loader to load itself.
32+
33 2010-09-28 Andreas Schwab <schwab@redhat.com>
34 Ulrich Drepper <drepper@gmail.com>
35
36Index: libc/elf/dl-deps.c
37===================================================================
38--- libc.orig/elf/dl-deps.c
39+++ libc/elf/dl-deps.c
40@@ -613,61 +613,64 @@ Filters not supported with LD_TRACE_PREL
41 map->l_searchlist.r_list[i]->l_reserved = 0;
42 }
43
44- /* Now determine the order in which the initialization has to happen. */
45+ /* Sort the initializer list to take dependencies into account. The binary
46+ itself will always be initialize last. */
47 memcpy (l_initfini, map->l_searchlist.r_list,
48 nlist * sizeof (struct link_map *));
49-
50- /* We can skip looking for the binary itself which is at the front
51- of the search list. */
52- assert (nlist > 1);
53- i = 1;
54- bool seen[nlist];
55- memset (seen, false, nlist * sizeof (seen[0]));
56- while (1)
57+ if (__builtin_expect (nlist > 1, 1))
58 {
59- /* Keep track of which object we looked at this round. */
60- seen[i] = true;
61- struct link_map *thisp = l_initfini[i];
62-
63- /* Find the last object in the list for which the current one is
64- a dependency and move the current object behind the object
65- with the dependency. */
66- unsigned int k = nlist - 1;
67- while (k > i)
68+ /* We can skip looking for the binary itself which is at the front
69+ of the search list. */
70+ i = 1;
71+ bool seen[nlist];
72+ memset (seen, false, nlist * sizeof (seen[0]));
73+ while (1)
74 {
75- struct link_map **runp = l_initfini[k]->l_initfini;
76- if (runp != NULL)
77- /* Look through the dependencies of the object. */
78- while (*runp != NULL)
79- if (__builtin_expect (*runp++ == thisp, 0))
80- {
81- /* Move the current object to the back past the last
82- object with it as the dependency. */
83- memmove (&l_initfini[i], &l_initfini[i + 1],
84- (k - i) * sizeof (l_initfini[0]));
85- l_initfini[k] = thisp;
86-
87- if (seen[i + 1])
88+ /* Keep track of which object we looked at this round. */
89+ seen[i] = true;
90+ struct link_map *thisp = l_initfini[i];
91+
92+ /* Find the last object in the list for which the current one is
93+ a dependency and move the current object behind the object
94+ with the dependency. */
95+ unsigned int k = nlist - 1;
96+ while (k > i)
97+ {
98+ struct link_map **runp = l_initfini[k]->l_initfini;
99+ if (runp != NULL)
100+ /* Look through the dependencies of the object. */
101+ while (*runp != NULL)
102+ if (__builtin_expect (*runp++ == thisp, 0))
103 {
104- ++i;
105- goto next_clear;
106+ /* Move the current object to the back past the last
107+ object with it as the dependency. */
108+ memmove (&l_initfini[i], &l_initfini[i + 1],
109+ (k - i) * sizeof (l_initfini[0]));
110+ l_initfini[k] = thisp;
111+
112+ if (seen[i + 1])
113+ {
114+ ++i;
115+ goto next_clear;
116+ }
117+
118+ memmove (&seen[i], &seen[i + 1],
119+ (k - i) * sizeof (seen[0]));
120+ seen[k] = true;
121+
122+ goto next;
123 }
124
125- memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
126- seen[k] = true;
127+ --k;
128+ }
129
130- goto next;
131- }
132+ if (++i == nlist)
133+ break;
134+ next_clear:
135+ memset (&seen[i], false, (nlist - i) * sizeof (seen[0]));
136
137- --k;
138+ next:;
139 }
140-
141- if (++i == nlist)
142- break;
143- next_clear:
144- memset (&seen[i], false, (nlist - i) * sizeof (seen[0]));
145-
146- next:;
147 }
148
149 /* Terminate the list of dependencies. */
150Index: libc/elf/dl-fini.c
151===================================================================
152--- libc.orig/elf/dl-fini.c
153+++ libc/elf/dl-fini.c
154@@ -33,9 +33,12 @@ internal_function
155 _dl_sort_fini (struct link_map *l, struct link_map **maps, size_t nmaps,
156 char *used, Lmid_t ns)
157 {
158+ /* A list of one element need not be sorted. */
159+ if (nmaps == 1)
160+ return;
161+
162 /* We can skip looking for the binary itself which is at the front
163 of the search list for the main namespace. */
164- assert (nmaps > 1);
165 unsigned int i = ns == LM_ID_BASE;
166 bool seen[nmaps];
167 memset (seen, false, nmaps * sizeof (seen[0]));
168@@ -195,9 +198,8 @@ _dl_fini (void)
169 assert (ns == LM_ID_BASE || i == nloaded || i == nloaded - 1);
170 nmaps = i;
171
172- if (nmaps > 1)
173- /* Now we have to do the sorting. */
174- _dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nmaps, NULL, ns);
175+ /* Now we have to do the sorting. */
176+ _dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nmaps, NULL, ns);
177
178 /* We do not rely on the linked list of loaded object anymore from
179 this point on. We have our own list here (maps). The various
diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
index f076ae7c7f..955c4ec4b9 100644
--- a/meta/recipes-core/eglibc/eglibc_2.13.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
@@ -1,9 +1,9 @@
1require eglibc.inc 1require eglibc.inc
2 2
3SRCREV = "14157" 3SRCREV = "15508"
4 4
5DEPENDS += "gperf-native" 5DEPENDS += "gperf-native"
6PR = "r17" 6PR = "r18"
7PR_append = "+svnr${SRCPV}" 7PR_append = "+svnr${SRCPV}"
8 8
9EGLIBC_BRANCH="eglibc-2_13" 9EGLIBC_BRANCH="eglibc-2_13"
@@ -16,7 +16,6 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
16 file://armv4-eabi-compile-fix.patch \ 16 file://armv4-eabi-compile-fix.patch \
17 file://etc/ld.so.conf \ 17 file://etc/ld.so.conf \
18 file://generate-supported.mk \ 18 file://generate-supported.mk \
19 file://glibc_bug_fix_12454.patch \
20 file://ppc-sqrt.patch \ 19 file://ppc-sqrt.patch \
21 file://multilib_readlib.patch \ 20 file://multilib_readlib.patch \
22 " 21 "