mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 22:26:42 +00:00
eglibc: update to eglibc-2.14-15360
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
61fb1ca698
commit
0697ba5b83
@ -19,12 +19,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="eglibc"
|
||||
PKG_VERSION="2.13-14178"
|
||||
PKG_VERSION="2.14-15360"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.eglibc.org/"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="timezone-data"
|
||||
PKG_BUILD_DEPENDS="ccache autotools linux-headers gcc-core"
|
||||
PKG_PRIORITY="optional"
|
||||
|
@ -1,205 +0,0 @@
|
||||
From glibc-cvs-return-51051-listarch-glibc-cvs=sources dot redhat dot com at sourceware dot org Mon May 30 16:32:22 2011
|
||||
Return-Path: <glibc-cvs-return-51051-listarch-glibc-cvs=sources dot redhat dot com at sourceware dot org>
|
||||
Delivered-To: listarch-glibc-cvs at sources dot redhat dot com
|
||||
Received: (qmail 24844 invoked by alias); 30 May 2011 16:32:18 -0000
|
||||
Received: (qmail 24805 invoked by uid 321); 30 May 2011 16:32:17 -0000
|
||||
Date: 30 May 2011 16:32:15 -0000
|
||||
Message-ID: <20110530163215.24780.qmail@sourceware.org>
|
||||
From: drepper at sourceware dot org
|
||||
To: glibc-cvs at sourceware dot org
|
||||
Subject: GNU C Library master sources branch, master, updated. glibc-2.13-254-g6b1e7d1
|
||||
X-Git-Refname: refs/heads/master
|
||||
X-Git-Reftype: branch
|
||||
X-Git-Oldrev: 4997db742946d08be4378cf91221f558f928bc73
|
||||
X-Git-Newrev: 6b1e7d1992cd89032df431c0e0d1418b97e57cd8
|
||||
Mailing-List: contact glibc-cvs-help at sourceware dot org; run by ezmlm
|
||||
Precedence: bulk
|
||||
List-Id: <glibc-cvs.sourceware.org>
|
||||
List-Archive: <http://sourceware.org/ml/glibc-cvs/>
|
||||
List-Post: <mailto:glibc-cvs at sourceware dot org>
|
||||
List-Help: <mailto:glibc-cvs-help at sourceware dot org>, <http://sourceware dot org/ml/#faqs>
|
||||
Sender: glibc-cvs-owner at sourceware dot org
|
||||
List-Subscribe: <mailto:glibc-cvs-subscribe at sourceware dot org>
|
||||
Delivered-To: mailing list glibc-cvs at sourceware dot org
|
||||
|
||||
This is an automated email from the git hooks/post-receive script. It was
|
||||
generated because a ref change was pushed to the repository containing
|
||||
the project "GNU C Library master sources".
|
||||
|
||||
The branch, master has been updated
|
||||
via 6b1e7d1992cd89032df431c0e0d1418b97e57cd8 (commit)
|
||||
from 4997db742946d08be4378cf91221f558f928bc73 (commit)
|
||||
|
||||
Those revisions listed above that are new to this repository have
|
||||
not appeared on any other notification email; so we list those
|
||||
revisions in full, below.
|
||||
|
||||
- Log -----------------------------------------------------------------
|
||||
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b1e7d1992cd89032df431c0e0d1418b97e57cd8
|
||||
|
||||
commit 6b1e7d1992cd89032df431c0e0d1418b97e57cd8
|
||||
Author: Ulrich Drepper <drepper@gmail.com>
|
||||
Date: Mon May 30 12:31:25 2011 -0400
|
||||
|
||||
Handle DSOs without any dependency in ld.so
|
||||
|
||||
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
|
||||
index d3c27f1..0b03b90 100644
|
||||
--- a/elf/dl-deps.c
|
||||
+++ b/elf/dl-deps.c
|
||||
@@ -617,61 +617,64 @@ Filters not supported with LD_TRACE_PRELINKING"));
|
||||
map->l_searchlist.r_list[i]->l_reserved = 0;
|
||||
}
|
||||
|
||||
- /* Now determine the order in which the initialization has to happen. */
|
||||
+ /* Sort the initializer list to take dependencies into account. The binary
|
||||
+ itself will always be initialize last. */
|
||||
memcpy (l_initfini, map->l_searchlist.r_list,
|
||||
nlist * sizeof (struct link_map *));
|
||||
-
|
||||
- /* We can skip looking for the binary itself which is at the front
|
||||
- of the search list. */
|
||||
- assert (nlist > 1);
|
||||
- i = 1;
|
||||
- bool seen[nlist];
|
||||
- memset (seen, false, nlist * sizeof (seen[0]));
|
||||
- while (1)
|
||||
+ if (__builtin_expect (nlist > 1, 1))
|
||||
{
|
||||
- /* Keep track of which object we looked at this round. */
|
||||
- seen[i] = true;
|
||||
- struct link_map *thisp = l_initfini[i];
|
||||
-
|
||||
- /* Find the last object in the list for which the current one is
|
||||
- a dependency and move the current object behind the object
|
||||
- with the dependency. */
|
||||
- unsigned int k = nlist - 1;
|
||||
- while (k > i)
|
||||
+ /* We can skip looking for the binary itself which is at the front
|
||||
+ of the search list. */
|
||||
+ i = 1;
|
||||
+ bool seen[nlist];
|
||||
+ memset (seen, false, nlist * sizeof (seen[0]));
|
||||
+ while (1)
|
||||
{
|
||||
- struct link_map **runp = l_initfini[k]->l_initfini;
|
||||
- if (runp != NULL)
|
||||
- /* Look through the dependencies of the object. */
|
||||
- while (*runp != NULL)
|
||||
- if (__builtin_expect (*runp++ == thisp, 0))
|
||||
- {
|
||||
- /* Move the current object to the back past the last
|
||||
- object with it as the dependency. */
|
||||
- memmove (&l_initfini[i], &l_initfini[i + 1],
|
||||
- (k - i) * sizeof (l_initfini[0]));
|
||||
- l_initfini[k] = thisp;
|
||||
-
|
||||
- if (seen[i + 1])
|
||||
+ /* Keep track of which object we looked at this round. */
|
||||
+ seen[i] = true;
|
||||
+ struct link_map *thisp = l_initfini[i];
|
||||
+
|
||||
+ /* Find the last object in the list for which the current one is
|
||||
+ a dependency and move the current object behind the object
|
||||
+ with the dependency. */
|
||||
+ unsigned int k = nlist - 1;
|
||||
+ while (k > i)
|
||||
+ {
|
||||
+ struct link_map **runp = l_initfini[k]->l_initfini;
|
||||
+ if (runp != NULL)
|
||||
+ /* Look through the dependencies of the object. */
|
||||
+ while (*runp != NULL)
|
||||
+ if (__builtin_expect (*runp++ == thisp, 0))
|
||||
{
|
||||
- ++i;
|
||||
- goto next_clear;
|
||||
+ /* Move the current object to the back past the last
|
||||
+ object with it as the dependency. */
|
||||
+ memmove (&l_initfini[i], &l_initfini[i + 1],
|
||||
+ (k - i) * sizeof (l_initfini[0]));
|
||||
+ l_initfini[k] = thisp;
|
||||
+
|
||||
+ if (seen[i + 1])
|
||||
+ {
|
||||
+ ++i;
|
||||
+ goto next_clear;
|
||||
+ }
|
||||
+
|
||||
+ memmove (&seen[i], &seen[i + 1],
|
||||
+ (k - i) * sizeof (seen[0]));
|
||||
+ seen[k] = true;
|
||||
+
|
||||
+ goto next;
|
||||
}
|
||||
|
||||
- memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
|
||||
- seen[k] = true;
|
||||
+ --k;
|
||||
+ }
|
||||
|
||||
- goto next;
|
||||
- }
|
||||
+ if (++i == nlist)
|
||||
+ break;
|
||||
+ next_clear:
|
||||
+ memset (&seen[i], false, (nlist - i) * sizeof (seen[0]));
|
||||
|
||||
- --k;
|
||||
+ next:;
|
||||
}
|
||||
-
|
||||
- if (++i == nlist)
|
||||
- break;
|
||||
- next_clear:
|
||||
- memset (&seen[i], false, (nlist - i) * sizeof (seen[0]));
|
||||
-
|
||||
- next:;
|
||||
}
|
||||
|
||||
/* Terminate the list of dependencies. */
|
||||
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
|
||||
index ba6c62a..269bcec 100644
|
||||
--- a/elf/dl-fini.c
|
||||
+++ b/elf/dl-fini.c
|
||||
@@ -33,9 +33,12 @@ internal_function
|
||||
_dl_sort_fini (struct link_map *l, struct link_map **maps, size_t nmaps,
|
||||
char *used, Lmid_t ns)
|
||||
{
|
||||
+ /* A list of one element need not be sorted. */
|
||||
+ if (nmaps == 1)
|
||||
+ return;
|
||||
+
|
||||
/* We can skip looking for the binary itself which is at the front
|
||||
of the search list for the main namespace. */
|
||||
- assert (nmaps > 1);
|
||||
unsigned int i = ns == LM_ID_BASE;
|
||||
bool seen[nmaps];
|
||||
memset (seen, false, nmaps * sizeof (seen[0]));
|
||||
@@ -195,9 +198,8 @@ _dl_fini (void)
|
||||
assert (ns == LM_ID_BASE || i == nloaded || i == nloaded - 1);
|
||||
nmaps = i;
|
||||
|
||||
- if (nmaps > 1)
|
||||
- /* Now we have to do the sorting. */
|
||||
- _dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nmaps, NULL, ns);
|
||||
+ /* Now we have to do the sorting. */
|
||||
+ _dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nmaps, NULL, ns);
|
||||
|
||||
/* We do not rely on the linked list of loaded object anymore from
|
||||
this point on. We have our own list here (maps). The various
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Summary of changes:
|
||||
ChangeLog | 6 ++++
|
||||
NEWS | 4 +-
|
||||
elf/dl-deps.c | 93 +++++++++++++++++++++++++++++---------------------------
|
||||
elf/dl-fini.c | 10 ++++--
|
||||
elf/rtld.c | 1 -
|
||||
5 files changed, 62 insertions(+), 52 deletions(-)
|
||||
|
||||
|
||||
hooks/post-receive
|
||||
--
|
||||
GNU C Library master sources
|
||||
|
@ -0,0 +1,137 @@
|
||||
From 675155e9084e060fd0e1e637b843f14e82898aa5 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Wed, 22 Sep 2010 12:06:30 +0200
|
||||
Subject: [PATCH] Fix memory leak on init/fini dependency list
|
||||
|
||||
diff --git a/elf/dl-close.c b/elf/dl-close.c
|
||||
index 73b2a2f..9bd91e3 100644
|
||||
--- a/elf/dl-close.c
|
||||
+++ b/elf/dl-close.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Close a shared object opened by `_dl_open'.
|
||||
- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1996-2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
|
||||
if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
|
||||
|| dl_close_state != not_pending)
|
||||
{
|
||||
- if (map->l_direct_opencount == 0)
|
||||
- {
|
||||
- if (map->l_type == lt_loaded)
|
||||
- dl_close_state = rerun;
|
||||
- else if (map->l_type == lt_library)
|
||||
- {
|
||||
- struct link_map **oldp = map->l_initfini;
|
||||
- map->l_initfini = map->l_orig_initfini;
|
||||
- _dl_scope_free (oldp);
|
||||
- }
|
||||
- }
|
||||
+ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
|
||||
+ dl_close_state = rerun;
|
||||
|
||||
/* There are still references to this object. Do nothing more. */
|
||||
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
|
||||
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
|
||||
index 9e30594..3890d00 100644
|
||||
--- a/elf/dl-deps.c
|
||||
+++ b/elf/dl-deps.c
|
||||
@@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
|
||||
nneeded * sizeof needed[0]);
|
||||
atomic_write_barrier ();
|
||||
l->l_initfini = l_initfini;
|
||||
+ l->l_free_initfini = 1;
|
||||
}
|
||||
|
||||
/* If we have no auxiliary objects just go on to the next map. */
|
||||
@@ -681,6 +682,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
|
||||
l_initfini[nlist] = NULL;
|
||||
atomic_write_barrier ();
|
||||
map->l_initfini = l_initfini;
|
||||
+ map->l_free_initfini = 1;
|
||||
if (l_reldeps != NULL)
|
||||
{
|
||||
atomic_write_barrier ();
|
||||
@@ -689,5 +691,5 @@ Filters not supported with LD_TRACE_PRELINKING"));
|
||||
_dl_scope_free (old_l_reldeps);
|
||||
}
|
||||
if (old_l_initfini != NULL)
|
||||
- map->l_orig_initfini = old_l_initfini;
|
||||
+ _dl_scope_free (old_l_initfini);
|
||||
}
|
||||
diff --git a/elf/dl-libc.c b/elf/dl-libc.c
|
||||
index 7be9483..a13fce3 100644
|
||||
--- a/elf/dl-libc.c
|
||||
+++ b/elf/dl-libc.c
|
||||
@@ -265,13 +265,13 @@ libc_freeres_fn (free_mem)
|
||||
|
||||
for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
|
||||
{
|
||||
- /* Remove all additional names added to the objects. */
|
||||
for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
|
||||
{
|
||||
struct libname_list *lnp = l->l_libname->next;
|
||||
|
||||
l->l_libname->next = NULL;
|
||||
|
||||
+ /* Remove all additional names added to the objects. */
|
||||
while (lnp != NULL)
|
||||
{
|
||||
struct libname_list *old = lnp;
|
||||
@@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
|
||||
if (! old->dont_free)
|
||||
free (old);
|
||||
}
|
||||
+
|
||||
+ /* Free the initfini dependency list. */
|
||||
+ if (l->l_free_initfini)
|
||||
+ free (l->l_initfini);
|
||||
}
|
||||
|
||||
if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
|
||||
diff --git a/elf/rtld.c b/elf/rtld.c
|
||||
index 4a9109e..617e30e 100644
|
||||
--- a/elf/rtld.c
|
||||
+++ b/elf/rtld.c
|
||||
@@ -2251,6 +2251,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
|
||||
lnp->dont_free = 1;
|
||||
lnp = lnp->next;
|
||||
}
|
||||
+ l->l_free_initfini = 0;
|
||||
|
||||
if (l != &GL(dl_rtld_map))
|
||||
_dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
|
||||
diff --git a/include/link.h b/include/link.h
|
||||
index e877104..051b99a 100644
|
||||
--- a/include/link.h
|
||||
+++ b/include/link.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Data structure for communication from the run-time dynamic linker for
|
||||
loaded ELF shared objects.
|
||||
- Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -192,6 +192,9 @@ struct link_map
|
||||
during LD_TRACE_PRELINKING=1
|
||||
contains any DT_SYMBOLIC
|
||||
libraries. */
|
||||
+ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
|
||||
+ freed, ie. not allocated with
|
||||
+ the dummy malloc in ld.so. */
|
||||
|
||||
/* Collected information about own RPATH directories. */
|
||||
struct r_search_path_struct l_rpath_dirs;
|
||||
@@ -240,9 +243,6 @@ struct link_map
|
||||
|
||||
/* List of object in order of the init and fini calls. */
|
||||
struct link_map **l_initfini;
|
||||
- /* The init and fini list generated at startup, saved when the
|
||||
- object is also loaded dynamically. */
|
||||
- struct link_map **l_orig_initfini;
|
||||
|
||||
/* List of the dependencies introduced through symbol binding. */
|
||||
struct link_map_reldeps
|
@ -0,0 +1,59 @@
|
||||
diff -Naur eglibc-2.14-15360/include/libc-symbols.h eglibc-2.14-15360.patch/include/libc-symbols.h
|
||||
--- eglibc-2.14-15360/include/libc-symbols.h 2011-09-17 16:13:20.000000000 +0200
|
||||
+++ eglibc-2.14-15360.patch/include/libc-symbols.h 2011-09-18 19:00:16.559302295 +0200
|
||||
@@ -656,7 +656,7 @@
|
||||
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
|
||||
# define libc_hidden_def(name) hidden_def (name)
|
||||
# define libc_hidden_weak(name) hidden_weak (name)
|
||||
-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
|
||||
+# define libc_hidden_nolink(name, version) hidden_def (name)
|
||||
# define libc_hidden_ver(local, name) hidden_ver (local, name)
|
||||
# define libc_hidden_data_def(name) hidden_data_def (name)
|
||||
# define libc_hidden_data_weak(name) hidden_data_weak (name)
|
||||
diff -Naur eglibc-2.14-15360/nis/Makefile eglibc-2.14-15360.patch/nis/Makefile
|
||||
--- eglibc-2.14-15360/nis/Makefile 2011-09-17 16:13:06.000000000 +0200
|
||||
+++ eglibc-2.14-15360.patch/nis/Makefile 2011-09-18 19:00:16.526301845 +0200
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
aux := nis_hash
|
||||
|
||||
+headers := $(wildcard rpcsvc/*.[hx])
|
||||
distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
|
||||
- nisplus-parser.h nis_xdr.h nss \
|
||||
- $(wildcard rpcsvc/*.[hx])
|
||||
+ nisplus-parser.h nis_xdr.h nss
|
||||
|
||||
# These are the databases available for the nis (and perhaps later nisplus)
|
||||
# service. This must be a superset of the services in nss.
|
||||
@@ -78,6 +78,8 @@
|
||||
|
||||
include ../Rules
|
||||
|
||||
+CFLAGS-nis_findserv.c += -fno-strict-aliasing
|
||||
+CFLAGS-ypclnt.c += -fno-strict-aliasing
|
||||
|
||||
$(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
|
||||
$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
|
||||
diff -Naur eglibc-2.14-15360/sunrpc/Makefile eglibc-2.14-15360.patch/sunrpc/Makefile
|
||||
--- eglibc-2.14-15360/sunrpc/Makefile 2011-09-17 16:13:12.000000000 +0200
|
||||
+++ eglibc-2.14-15360.patch/sunrpc/Makefile 2011-09-18 19:01:31.772325016 +0200
|
||||
@@ -55,7 +55,7 @@
|
||||
des_crypt.h)
|
||||
headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
|
||||
$(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
|
||||
-headers = rpc/netdb.h
|
||||
+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
|
||||
generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
|
||||
$(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
|
||||
generated-dirs := rpcsvc
|
||||
@@ -165,6 +165,10 @@
|
||||
|
||||
CPPFLAGS += -D_RPC_THREAD_SAFE_
|
||||
|
||||
+CFLAGS-clnt_tcp.c += -fno-strict-aliasing
|
||||
+CFLAGS-clnt_udp.c += -fno-strict-aliasing
|
||||
+CFLAGS-clnt_unix.c += -fno-strict-aliasing
|
||||
+
|
||||
$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
|
||||
$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
|
||||
$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
|
Loading…
x
Reference in New Issue
Block a user