New version 2.19 (sync with OpenMandriva 2014.0), now includes locales

This commit is contained in:
Andrey Bondrov 2014-05-22 18:55:40 +11:00
parent d71bf7a74d
commit da72ea0f9a
114 changed files with 48718 additions and 6676 deletions

View file

@ -1,7 +1,4 @@
---
sources: sources:
crypt_blowfish-1.2.tar.gz: 306ff83af206fac786900ce5e4800516cae909d9 crypt_blowfish-1.2.tar.gz: 306ff83af206fac786900ce5e4800516cae909d9
glibc-2.15-a316c1f-fedora.tar.gz: fc08eb2483a8401fd324ffd36290d54a5b55bde3
glibc-2.15-a316c1f.tar.gz: aa07170ac6e14a2b3eecd45af19825fa36844dd6
glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f
glibc-ports-2.15-ad8ae7d.tar.gz: 8626c7eb72f0cad6acf0b94d72b124b8d2dac825 glibc-2.19.tar.xz: b29e1f94b8a32e283e1cb66c9a913950c496fb51

21
Makefile.locales Normal file
View file

@ -0,0 +1,21 @@
SUPPORTED ?= /usr/share/i18n/SUPPORTED
include $(SUPPORTED)
INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
install-locales: $(INSTALL-SUPPORTED-LOCALES)
install-locales-dir:
mkdir -p $(DESTDIR)/usr/share/locale
$(INSTALL-SUPPORTED-LOCALES): install-locales-dir
@locale=`echo $@ | sed -e 's/^install-//'`; \
charset=`echo $$locale | sed -e 's,.*/,,'`; \
locale=`echo $$locale | sed -e 's,/[^/]*,,'`; \
input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
echo "localedef -i $$input -c -f $$charset" \
"$(DESTDIR)/usr/share/locale/$$locale"; \
localedef -i $$input -c -f $$charset \
$(DESTDIR)/usr/share/locale/$$locale; \

29
crypt_blowfish-arm.patch Normal file
View file

@ -0,0 +1,29 @@
Don't use '@progbits' on arm
Proper declaration should be %progbits as '@' is used for comments.
Most of other arches allow % or @ so use %
Signed-off-by: Arnaud Patard <rtp@mageia.org>
Index: glibc-2.14.1/crypt/x86.S
===================================================================
--- glibc-2.14.1.orig/crypt/x86.S
+++ glibc-2.14.1/crypt/x86.S
@@ -199,5 +199,5 @@ BF_die:
#endif
#if defined(__ELF__) && defined(__linux__)
-.section .note.GNU-stack,"",@progbits
+.section .note.GNU-stack,"",%progbits
#endif
Index: glibc-2.14.1/crypt_blowfish-1.2/x86.S
===================================================================
--- glibc-2.14.1.orig/crypt_blowfish-1.2/x86.S
+++ glibc-2.14.1/crypt_blowfish-1.2/x86.S
@@ -199,5 +199,5 @@ BF_die:
#endif
#if defined(__ELF__) && defined(__linux__)
-.section .note.GNU-stack,"",@progbits
+.section .note.GNU-stack,"",%progbits
#endif

View file

@ -0,0 +1,23 @@
--- libc/localedata/locales/bo_CN.bero 2012-12-27 21:59:42.264405770 +0100
+++ libc/localedata/locales/bo_CN 2012-12-27 21:59:49.516318268 +0100
@@ -144,8 +144,7 @@ END LC_MEASUREMENT
LC_NAME
% FIXME
-
-name_fmt ""
+name_fmt "FIXME"
% name_gen "FIXME"
% name_miss "FIXME"
% name_mr "FIXME"
--- libc/localedata/locales/bo_IN.bero 2012-12-27 21:59:52.912277247 +0100
+++ libc/localedata/locales/bo_IN 2012-12-27 22:00:49.732591846 +0100
@@ -70,7 +70,7 @@ END LC_MEASUREMENT
LC_NAME
% FIXME
-name_fmt ""
+name_fmt "FIXME"
% name_gen "FIXME"
% name_miss "FIXME"
% name_mr "FIXME"

View file

@ -0,0 +1,92 @@
--- glibc-2.18.99/locale/iso-4217.def.curr~ 2014-01-04 14:58:08.000000000 +0100
+++ glibc-2.18.99/locale/iso-4217.def 2014-01-04 23:34:07.564414165 +0100
@@ -8,6 +8,7 @@
*
* !!! The list has to be sorted !!!
*/
+DEFINE_INT_CURR("ADP") /* Andorran Peseta -> EUR */
DEFINE_INT_CURR("AED") /* United Arab Emirates Dirham */
DEFINE_INT_CURR("AFN") /* Afghanistan Afgani */
DEFINE_INT_CURR("ALL") /* Albanian Lek */
@@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD") /* Armenia Dram
DEFINE_INT_CURR("ANG") /* Netherlands Antilles */
DEFINE_INT_CURR("AOA") /* Angolan Kwanza */
DEFINE_INT_CURR("ARS") /* Argentine Peso */
+DEFINE_INT_CURR("ATS") /* Austrian Schilling -> EUR */
DEFINE_INT_CURR("AUD") /* Australian Dollar */
DEFINE_INT_CURR("AWG") /* Aruba Guilder */
DEFINE_INT_CURR("AZN") /* Azerbaijan Manat */
DEFINE_INT_CURR("BAM") /* Bosnian and Herzegovina Convertible Mark */
DEFINE_INT_CURR("BBD") /* Barbados Dollar */
DEFINE_INT_CURR("BDT") /* Bangladesh Taka */
+DEFINE_INT_CURR("BEF") /* Belgian Franc -> EUR */
DEFINE_INT_CURR("BGN") /* Bulgarian Lev */
DEFINE_INT_CURR("BHD") /* Bahraini Dinar */
DEFINE_INT_CURR("BIF") /* Burundi Franc */
@@ -44,6 +47,7 @@ DEFINE_INT_CURR("CUP") /* Cuban Peso *
DEFINE_INT_CURR("CVE") /* Cape Verde Escudo */
DEFINE_INT_CURR("CYP") /* Cypriot Pound */
DEFINE_INT_CURR("CZK") /* Czech Koruna */
+DEFINE_INT_CURR("DEM") /* German Mark -> EUR */
DEFINE_INT_CURR("DJF") /* Djibouti Franc */
DEFINE_INT_CURR("DKK") /* Danish Krone (Faroe Islands, Greenland) */
DEFINE_INT_CURR("DOP") /* Dominican Republic */
@@ -51,16 +55,20 @@ DEFINE_INT_CURR("DZD") /* Algerian Dina
DEFINE_INT_CURR("EEK") /* Estonian Kroon */
DEFINE_INT_CURR("EGP") /* Egyptian Pound */
DEFINE_INT_CURR("ERN") /* Eritrean Nakfa */
+DEFINE_INT_CURR("ESP") /* Spanish Peseta -> EUR */
DEFINE_INT_CURR("ETB") /* Ethiopian Birr */
DEFINE_INT_CURR("EUR") /* European Union Euro */
+DEFINE_INT_CURR("FIM") /* Finnish Markka -> EUR */
DEFINE_INT_CURR("FJD") /* Fiji Dollar */
DEFINE_INT_CURR("FKP") /* Falkland Islands Pound (Malvinas) */
+DEFINE_INT_CURR("FRF") /* French Franc -> EUR */
DEFINE_INT_CURR("GBP") /* British Pound */
DEFINE_INT_CURR("GEL") /* Georgia Lari */
DEFINE_INT_CURR("GHS") /* Ghana Cedi */
DEFINE_INT_CURR("GIP") /* Gibraltar Pound */
DEFINE_INT_CURR("GMD") /* Gambian Dalasi */
DEFINE_INT_CURR("GNF") /* Guinea Franc */
+DEFINE_INT_CURR("GRD") /* Greek Drachma -> EUR */
DEFINE_INT_CURR("GTQ") /* Guatemala Quetzal */
DEFINE_INT_CURR("GYD") /* Guyana Dollar */
DEFINE_INT_CURR("HKD") /* Hong Kong Dollar */
@@ -69,11 +77,13 @@ DEFINE_INT_CURR("HRK") /* Croatia Kuna
DEFINE_INT_CURR("HTG") /* Haiti Gourde */
DEFINE_INT_CURR("HUF") /* Hungarian Forint */
DEFINE_INT_CURR("IDR") /* Indonesia Rupiah */
+DEFINE_INT_CURR("IEP") /* Irish Pound -> EUR */
DEFINE_INT_CURR("ILS") /* Israeli Shekel */
DEFINE_INT_CURR("INR") /* Indian Rupee (Bhutan) */
DEFINE_INT_CURR("IQD") /* Iraqi Dinar */
DEFINE_INT_CURR("IRR") /* Iranian Rial */
DEFINE_INT_CURR("ISK") /* Iceland Krona */
+DEFINE_INT_CURR("ITL") /* Italian Lira -> EUR */
DEFINE_INT_CURR("JMD") /* Jamaican Dollar */
DEFINE_INT_CURR("JOD") /* Jordanian Dinar */
DEFINE_INT_CURR("JPY") /* Japanese Yen */
@@ -92,6 +102,7 @@ DEFINE_INT_CURR("LKR") /* Sri Lankan Ru
DEFINE_INT_CURR("LRD") /* Liberian Dollar */
DEFINE_INT_CURR("LSL") /* Lesotho Maloti */
DEFINE_INT_CURR("LTL") /* Lithuanian Litas */
+DEFINE_INT_CURR("LUF") /* Luxembourg Franc -> EUR */
DEFINE_INT_CURR("LVL") /* Latvia Lat */
DEFINE_INT_CURR("LYD") /* Libyan Arab Jamahiriya Dinar */
DEFINE_INT_CURR("MAD") /* Moroccan Dirham */
@@ -112,6 +123,7 @@ DEFINE_INT_CURR("MZN") /* Mozambique Me
DEFINE_INT_CURR("NAD") /* Namibia Dollar */
DEFINE_INT_CURR("NGN") /* Nigeria Naira */
DEFINE_INT_CURR("NIO") /* Nicaragua Cordoba Oro */
+DEFINE_INT_CURR("NLG") /* Netherlands Guilder -> EUR */
DEFINE_INT_CURR("NOK") /* Norwegian Krone */
DEFINE_INT_CURR("NPR") /* Nepalese Rupee */
DEFINE_INT_CURR("NZD") /* New Zealand Dollar */
@@ -122,6 +134,7 @@ DEFINE_INT_CURR("PGK") /* Papau New Gui
DEFINE_INT_CURR("PHP") /* Philippines Peso */
DEFINE_INT_CURR("PKR") /* Pakistan Rupee */
DEFINE_INT_CURR("PLN") /* Polish Zloty */
+DEFINE_INT_CURR("PTE") /* Portuguese Escudo -> EUR */
DEFINE_INT_CURR("PYG") /* Paraguay Guarani */
DEFINE_INT_CURR("QAR") /* Qatar Rial */
DEFINE_INT_CURR("RON") /* Romanian New Leu */

View file

@ -0,0 +1,57 @@
diff -Nrup a/localedata/locales/cy_GB b/localedata/locales/cy_GB
--- a/localedata/locales/cy_GB 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/locales/cy_GB 2012-06-07 12:15:21.805318719 -0600
@@ -248,9 +248,9 @@ mon "<U0049><U006F><U006E><U0061
d_t_fmt "<U0044><U0079><U0064><U0064><U0020><U0025><U0041><U0020><U0025><U0064><U0020><U006d><U0069><U0073><U0020><U0025><U0042><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
t_fmt "<U0025><U0054>"
-am_pm "<U0061><U006D>";"<U0070><U006D>"
+am_pm "<U0041><U004D>";"<U0050><U004D>"
t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
-date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
first_workday 2
diff -Nrup a/localedata/locales/en_GB b/localedata/locales/en_GB
--- a/localedata/locales/en_GB 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/locales/en_GB 2012-06-07 12:15:21.806318715 -0600
@@ -116,7 +116,7 @@ mon "<U004A><U0061><U006E><U0075
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
-am_pm "<U0061><U006D>";"<U0070><U006D>"
+am_pm "<U0041><U004D>";"<U0050><U004D>"
t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
diff -Nrup a/localedata/locales/zh_TW b/localedata/locales/zh_TW
--- a/localedata/locales/zh_TW 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/locales/zh_TW 2012-06-07 12:15:21.807318711 -0600
@@ -1,7 +1,7 @@
comment_char %
escape_char /
%
-% Chinese language locale for Taiwan R.O.C.
+% Chinese language locale for Taiwan
% charmap: BIG5-CP950
%
% Original Author:
@@ -17,7 +17,7 @@ escape_char /
% Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
LC_IDENTIFICATION
-title "Chinese locale for Taiwan R.O.C."
+title "Chinese locale for Taiwan"
source ""
address ""
contact ""
@@ -25,7 +25,7 @@ email "bug-glibc-locales@gnu.org"
tel ""
fax ""
language "Chinese"
-territory "Taiwan R.O.C."
+territory "Taiwan"
revision "0.2"
date "2000-08-02"
%

View file

@ -0,0 +1,57 @@
From ee3d4021aaaeacff7cf2addcdaa48859fffba2aa Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 3 Feb 2011 15:45:02 +0100
Subject: [PATCH] Replace setuid by file capabilities
* login/programs/pt_chown.c (main): Check for valid file
descriptor instead of privileges. Be careful to drop all
capabilities when not needed.
---
ChangeLog | 6 ++++++
login/programs/pt_chown.c | 14 +++++++++-----
3 files changed, 16 insertions(+), 6 deletions(-)
--- a/login/programs/pt_chown.c
+++ b/login/programs/pt_chown.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <fcntl.h>
#ifdef HAVE_LIBCAP
# include <sys/capability.h>
# include <sys/prctl.h>
@@ -142,7 +143,7 @@ main (int argc, char *argv[])
uid_t uid = getuid ();
int remaining;
- if (argc == 1 && euid == 0)
+ if (argc == 1 && fcntl (PTY_FILENO, F_GETFD) == 0)
{
#ifdef HAVE_LIBCAP
/* Drop privileges. */
@@ -175,6 +176,13 @@ main (int argc, char *argv[])
/* We aren't going to be using privileges, so drop them right now. */
setuid (uid);
+#ifdef HAVE_LIBCAP
+ cap_t caps = cap_init ();
+ if (caps == NULL)
+ error (1, errno, "cap_init");
+ cap_set_proc (caps);
+ cap_free (caps);
+#endif
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
@@ -194,9 +202,5 @@ main (int argc, char *argv[])
return EXIT_FAILURE;
}
- /* Check if we are properly installed. */
- if (euid != 0)
- error (FAIL_EXEC, 0, gettext ("needs to be installed setuid `root'"));
-
return EXIT_SUCCESS;
}

View file

@ -0,0 +1,76 @@
--- libc/elf/Makefile.aliasing~ 2012-12-02 22:11:45.000000000 +0100
+++ libc/elf/Makefile 2012-12-27 19:46:13.396658450 +0100
@@ -53,6 +53,7 @@ CFLAGS-dl-iterate-phdr.c = $(uses-callba
ifeq ($(unwind-find-fde),yes)
routines += unwind-dw2-fde-glibc
shared-only-routines += unwind-dw2-fde-glibc
+CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing
endif
before-compile = $(objpfx)trusted-dirs.h
--- libc/inet/Makefile.aliasing~ 2012-08-28 16:14:43.000000000 +0200
+++ libc/inet/Makefile 2012-12-27 19:48:23.933089723 +0100
@@ -62,6 +62,8 @@ tests-$(OPTION_EGLIBC_ADVANCED_INET6) +=
include ../Rules
+CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing
+
ifeq ($(have-thread-library),yes)
CFLAGS-gethstbyad_r.c = -fexceptions
--- libc/nis/Makefile.aliasing~ 2012-05-12 17:44:41.000000000 +0200
+++ libc/nis/Makefile 2012-12-27 19:46:13.396658450 +0100
@@ -80,6 +80,8 @@ libnss_nisplus-inhibit-o = $(filter-out
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) \
--- libc/nss/Makefile.aliasing~ 2012-10-10 17:35:46.000000000 +0200
+++ libc/nss/Makefile 2012-12-27 19:46:13.396658450 +0100
@@ -147,6 +147,7 @@ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpf
echo '#include "$<"') > $@.new
mv -f $@.new $@
+CFLAGS-files-hosts.c += -fno-strict-aliasing
$(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
--- libc/resolv/Makefile.aliasing~ 2012-10-25 19:18:12.000000000 +0200
+++ libc/resolv/Makefile 2012-12-27 19:46:13.396658450 +0100
@@ -83,6 +83,7 @@ ifeq (yes,$(have-ssp))
CFLAGS-libresolv += -fstack-protector
endif
CFLAGS-res_hconf.c = -fexceptions
+CFLAGS-res_send.c += -fno-strict-aliasing
# The BIND code elicits some harmless warnings.
+cflags += -Wno-strict-prototypes -Wno-write-strings
--- libc/sunrpc/Makefile.aliasing~ 2012-05-26 19:46:57.000000000 +0200
+++ libc/sunrpc/Makefile 2012-12-27 19:46:13.397658439 +0100
@@ -164,6 +164,10 @@ sunrpc-CPPFLAGS = -D_RPC_THREAD_SAFE_
CPPFLAGS += $(sunrpc-CPPFLAGS)
BUILD_CPPFLAGS += $(sunrpc-CPPFLAGS)
+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
--- libc/sysdeps/powerpc/powerpc64/Makefile.aliasing~ 2012-12-27 19:46:13.392658496 +0100
+++ libc/sysdeps/powerpc/powerpc64/Makefile 2012-12-27 19:46:13.397658439 +0100
@@ -37,6 +37,8 @@ CFLAGS-rtld-strnlen.os = $(no-special-re
CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
+CFLAGS-gmon-start.c += -fno-strict-aliasing
+
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing

View file

@ -0,0 +1,22 @@
From e818d7d5034bd33373aebf570402abdb8e434f6e Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Sat, 19 Mar 2005 20:18:00 +0000
Subject: [PATCH] Updated to fedora-glibc-20050319T1907
---
debug/tst-chk1.c | 234 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 229 insertions(+), 5 deletions(-)
diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c
--- a/debug/tst-chk1.c
+++ b/debug/tst-chk1.c
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* Hack: make sure GCC doesn't know __chk_fail () will not return. */
+#define __noreturn__
+
#include <assert.h>
#include <fcntl.h>
#include <locale.h>

View file

@ -0,0 +1,33 @@
--- glibc-2.18/crypt/crypt-entry.c.relocateFcrypt~ 2013-08-17 14:44:36.146493787 +0200
+++ glibc-2.18/crypt/crypt-entry.c 2013-08-17 14:44:42.994408176 +0200
@@ -182,20 +182,3 @@ crypt (key, salt)
return __crypt_r (key, salt, &_ufc_foobar);
}
#endif
-
-
-/*
- * To make fcrypt users happy.
- * They don't need to call init_des.
- */
-#ifdef _LIBC
-weak_alias (crypt, fcrypt)
-#else
-char *
-__fcrypt (key, salt)
- const char *key;
- const char *salt;
-{
- return crypt (key, salt);
-}
-#endif
--- glibc-2.18/crypt/wrapper.c.relocateFcrypt~ 2013-08-17 14:44:36.143493824 +0200
+++ glibc-2.18/crypt/wrapper.c 2013-08-17 14:44:36.146493787 +0200
@@ -324,7 +324,6 @@ weak_alias(__crypt, crypt)
weak_alias(__crypt_gensalt_rn, crypt_gensalt_rn)
weak_alias(__crypt_gensalt_ra, crypt_gensalt_ra)
weak_alias(__crypt_gensalt, crypt_gensalt)
-weak_alias(crypt, fcrypt)
#endif
#ifdef TEST

View file

@ -1,49 +1,5 @@
2002-12-07 Gwenole Beauchesne <gbeauchesne@mandriva.com> --- glibc-2.18/sysdeps/i386/dl-hwcapinfo.h.hwcap~ 2013-08-17 14:18:10.909311979 +0200
+++ glibc-2.18/sysdeps/i386/dl-hwcapinfo.h 2013-08-17 14:18:10.909311979 +0200
* sysdeps/i386/dl-procinfo.h (HWCAP_I386_*): Move to...
* sysdeps/i386/dl-hwcapinfo.h: ... here. New file.
--- glibc-2.4.90/sysdeps/i386/dl-procinfo.h.i386-hwcapinfo 2004-03-10 19:29:31.000000000 +0100
+++ glibc-2.4.90/sysdeps/i386/dl-procinfo.h 2006-05-17 06:23:50.000000000 +0200
@@ -32,34 +32,8 @@
#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \
<< _DL_FIRST_PLATFORM)
-enum
-{
- HWCAP_I386_FPU = 1 << 0,
- HWCAP_I386_VME = 1 << 1,
- HWCAP_I386_DE = 1 << 2,
- HWCAP_I386_PSE = 1 << 3,
- HWCAP_I386_TSC = 1 << 4,
- HWCAP_I386_MSR = 1 << 5,
- HWCAP_I386_PAE = 1 << 6,
- HWCAP_I386_MCE = 1 << 7,
- HWCAP_I386_CX8 = 1 << 8,
- HWCAP_I386_APIC = 1 << 9,
- HWCAP_I386_SEP = 1 << 11,
- HWCAP_I386_MTRR = 1 << 12,
- HWCAP_I386_PGE = 1 << 13,
- HWCAP_I386_MCA = 1 << 14,
- HWCAP_I386_CMOV = 1 << 15,
- HWCAP_I386_FCMOV = 1 << 16,
- HWCAP_I386_MMX = 1 << 23,
- HWCAP_I386_OSFXSR = 1 << 24,
- HWCAP_I386_XMM = 1 << 25,
- HWCAP_I386_XMM2 = 1 << 26,
- HWCAP_I386_AMD3D = 1 << 31,
-
- /* XXX Which others to add here? */
- HWCAP_IMPORTANT = (HWCAP_I386_XMM2)
-
-};
+/* Get HWCAP definitions. */
+#include <sysdeps/i386/dl-hwcapinfo.h>
/* We cannot provide a general printing function. */
#define _dl_procinfo(word) -1
--- glibc-2.4.90/sysdeps/i386/dl-hwcapinfo.h.i386-hwcapinfo 2006-05-17 06:28:35.000000000 +0200
+++ glibc-2.4.90/sysdeps/i386/dl-hwcapinfo.h 2006-05-17 06:25:38.000000000 +0200
@@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
+/* i386 version of processor capability definitions. +/* i386 version of processor capability definitions.
+ Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
@ -98,3 +54,42 @@
+}; +};
+ +
+#endif /* dl-hwcapinfo.h */ +#endif /* dl-hwcapinfo.h */
--- glibc-2.18/sysdeps/i386/dl-procinfo.h.hwcap~ 2013-08-17 14:18:10.909311979 +0200
+++ glibc-2.18/sysdeps/i386/dl-procinfo.h 2013-08-17 14:26:50.222819666 +0200
@@ -31,34 +31,8 @@
#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \
<< _DL_FIRST_PLATFORM)
-enum
-{
- HWCAP_I386_FPU = 1 << 0,
- HWCAP_I386_VME = 1 << 1,
- HWCAP_I386_DE = 1 << 2,
- HWCAP_I386_PSE = 1 << 3,
- HWCAP_I386_TSC = 1 << 4,
- HWCAP_I386_MSR = 1 << 5,
- HWCAP_I386_PAE = 1 << 6,
- HWCAP_I386_MCE = 1 << 7,
- HWCAP_I386_CX8 = 1 << 8,
- HWCAP_I386_APIC = 1 << 9,
- HWCAP_I386_SEP = 1 << 11,
- HWCAP_I386_MTRR = 1 << 12,
- HWCAP_I386_PGE = 1 << 13,
- HWCAP_I386_MCA = 1 << 14,
- HWCAP_I386_CMOV = 1 << 15,
- HWCAP_I386_FCMOV = 1 << 16,
- HWCAP_I386_MMX = 1 << 23,
- HWCAP_I386_OSFXSR = 1 << 24,
- HWCAP_I386_XMM = 1 << 25,
- HWCAP_I386_XMM2 = 1 << 26,
- HWCAP_I386_AMD3D = 1 << 31,
-
- /* XXX Which others to add here? */
- HWCAP_IMPORTANT = (HWCAP_I386_XMM2)
-
-};
+/* Get HWCAP definitions */
+#include <sysdeps/i386/dl-hwcapinfo.h>
/* We cannot provide a general printing function. */
#define _dl_procinfo(type, word) -1

View file

@ -1,33 +1,16 @@
2006-05-17 Gwenole Beauchesne <gbeauchesne@mandriva.com> --- glibc-2.18/elf/rtld.c.hpt~ 2013-08-17 14:27:41.038184387 +0200
+++ glibc-2.18/elf/rtld.c 2013-08-17 14:29:31.166807590 +0200
* Update and simplify for glibc 2.4.90. @@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
2002-12-07 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> <http://www.gnu.org/licenses/>. */
Let an i586 rtld load i686 libraries (especially libpthread)
* elf/rtld.c (HP_TIMING_AVAIL): Redefine to HP_TIMING_HWCAP_AVAIL
since early statistics require high-precision timers.
* sysdeps/generic/ldsodefs.h (rtld_global): Declare
_dl_cpuclock_offset if HP_TIMING_HWCAP_AVAIL is defined too.
* sysdeps/unix/sysv/linux/i386/i586/Makefile: New file.
* sysdeps/unix/sysv/linux/i386/i586/hp-timing.c: New file.
* sysdeps/unix/sysv/linux/i386/i586/hp-timing.h: New file.
--- glibc-2.4.90/elf/rtld.c.i586-hptiming 2006-04-27 14:54:33.000000000 +0200
+++ glibc-2.4.90/elf/rtld.c 2006-05-17 08:31:50.000000000 +0200
@@ -17,6 +17,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+/* Early statistics require high-precision timing. */ +/* Early statistics require high-precision timing */
+#define NEED_HP_TIMING_HWCAP_AVAIL 1 +#define NEED_HP_TIMING_HWCAP_AVAIL 1
+ +
#include <errno.h> #include <errno.h>
#include <dlfcn.h> #include <dlfcn.h>
#include <fcntl.h> #include <fcntl.h>
@@ -178,6 +181,12 @@ static void dl_main (const ElfW(Phdr) *p @@ -193,6 +196,12 @@ static void dl_main (const ElfW(Phdr) *p
static struct libname_list _dl_rtld_libname; static struct libname_list _dl_rtld_libname;
static struct libname_list _dl_rtld_libname2; static struct libname_list _dl_rtld_libname2;
@ -40,7 +23,7 @@
/* We expect less than a second for relocation. */ /* We expect less than a second for relocation. */
#ifdef HP_SMALL_TIMING_AVAIL #ifdef HP_SMALL_TIMING_AVAIL
# undef HP_TIMING_AVAIL # undef HP_TIMING_AVAIL
@@ -311,9 +320,8 @@ _dl_start_final (void *arg, struct dl_st @@ -315,9 +324,8 @@ _dl_start_final (void *arg, struct dl_st
#endif #endif
@ -52,9 +35,9 @@
/* Initialize the stack end variable. */ /* Initialize the stack end variable. */
__libc_stack_end = __builtin_frame_address (0); __libc_stack_end = __builtin_frame_address (0);
--- glibc-2.4.90/sysdeps/generic/ldsodefs.h.i586-hptiming 2006-05-10 15:42:19.000000000 +0200 --- glibc-2.18/sysdeps/generic/ldsodefs.h.hpt~ 2013-08-11 00:52:55.000000000 +0200
+++ glibc-2.4.90/sysdeps/generic/ldsodefs.h 2006-05-17 08:13:21.000000000 +0200 +++ glibc-2.18/sysdeps/generic/ldsodefs.h 2013-08-17 14:27:41.153182949 +0200
@@ -408,7 +408,7 @@ struct rtld_global @@ -321,7 +321,7 @@ struct rtld_global
/* The object to be initialized first. */ /* The object to be initialized first. */
EXTERN struct link_map *_dl_initfirst; EXTERN struct link_map *_dl_initfirst;
@ -63,7 +46,7 @@
/* Start time on CPU clock. */ /* Start time on CPU clock. */
EXTERN hp_timing_t _dl_cpuclock_offset; EXTERN hp_timing_t _dl_cpuclock_offset;
#endif #endif
@@ -619,7 +619,7 @@ struct rtld_global_ro @@ -534,7 +534,7 @@ struct rtld_global_ro
/* All search directories defined at startup. */ /* All search directories defined at startup. */
EXTERN struct r_search_path_elem *_dl_init_all_dirs; EXTERN struct r_search_path_elem *_dl_init_all_dirs;
@ -72,20 +55,13 @@
/* Overhead of a high-precision timing measurement. */ /* Overhead of a high-precision timing measurement. */
EXTERN hp_timing_t _dl_hp_timing_overhead; EXTERN hp_timing_t _dl_hp_timing_overhead;
#endif #endif
--- glibc-2.4.90/sysdeps/i386/i586/Makefile.i586-hptiming 2006-05-17 06:35:29.000000000 +0200 --- glibc-2.18/sysdeps/i386/i586/hp-timing.c.hpt~ 2013-08-17 14:27:41.153182949 +0200
+++ glibc-2.4.90/sysdeps/i386/i586/Makefile 2006-05-17 06:35:41.000000000 +0200 +++ glibc-2.18/sysdeps/i386/i586/hp-timing.c 2013-08-17 14:27:41.153182949 +0200
@@ -0,0 +1,4 @@
+ifeq ($(subdir),csu)
+sysdep_routines += hp-timing
+static-only-routines += hp-timing
+endif
--- glibc-2.4.90/sysdeps/i386/i586/hp-timing.c.i586-hptiming 2006-05-17 06:36:28.000000000 +0200
+++ glibc-2.4.90/sysdeps/i386/i586/hp-timing.c 2006-05-17 08:17:51.000000000 +0200
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
+/* We can use the i686 implementation without changes. */ +/* We can use the i686 implementation without changes. */
+#include <sysdeps/i386/i686/hp-timing.c> +#include <sysdeps/i386/i686/hp-timing.c>
--- glibc-2.4.90/sysdeps/i386/i586/hp-timing.h.i586-hptiming 2006-05-17 06:37:28.000000000 +0200 --- glibc-2.18/sysdeps/i386/i586/hp-timing.h.hpt~ 2013-08-17 14:27:41.153182949 +0200
+++ glibc-2.4.90/sysdeps/i386/i586/hp-timing.h 2006-05-17 08:30:06.000000000 +0200 +++ glibc-2.18/sysdeps/i386/i586/hp-timing.h 2013-08-17 14:27:41.153182949 +0200
@@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
+#ifndef _HP_HWCAP_TIMING_H +#ifndef _HP_HWCAP_TIMING_H
+#define _HP_HWCAP_TIMING_H 1 +#define _HP_HWCAP_TIMING_H 1
@ -130,3 +106,10 @@
+#endif +#endif
+ +
+#endif /* hp-timing.h */ +#endif /* hp-timing.h */
--- glibc-2.18/sysdeps/i386/i586/Makefile.hpt~ 2013-08-17 14:27:41.153182949 +0200
+++ glibc-2.18/sysdeps/i386/i586/Makefile 2013-08-17 14:27:41.153182949 +0200
@@ -0,0 +1,4 @@
+ifeq ($(subdir),csu)
+sysdep_routines += hp-timing
+static-only-routines += hp-timing
+endif

View file

@ -1,7 +1,33 @@
diff -p -up glibc-2.10.1/crypt/Makefile.orig glibc-2.10.1/crypt/Makefile --- glibc-2.18/crypt/crypt-entry.c.owlCrypt~ 2013-08-11 00:52:55.000000000 +0200
--- glibc-2.10.1/crypt/Makefile.orig 2009-04-07 15:34:04.000000000 -0300 +++ glibc-2.18/crypt/crypt-entry.c 2013-08-17 14:39:14.300517415 +0200
+++ glibc-2.10.1/crypt/Makefile 2009-05-27 00:02:34.000000000 -0300 @@ -81,7 +81,7 @@ extern struct crypt_data _ufc_foobar;
@@ -21,13 +21,13 @@ */
char *
-__crypt_r (key, salt, data)
+__des_crypt_r (key, salt, data)
const char *key;
const char *salt;
struct crypt_data * __restrict data;
@@ -155,6 +155,7 @@ __crypt_r (key, salt, data)
_ufc_output_conversion_r (res[0], res[1], salt, data);
return data->crypt_3_buf;
}
+#if 0
weak_alias (__crypt_r, crypt_r)
char *
@@ -180,6 +181,7 @@ crypt (key, salt)
return __crypt_r (key, salt, &_ufc_foobar);
}
+#endif
/*
--- glibc-2.18/crypt/Makefile.owlCrypt~ 2013-08-17 14:38:07.574351607 +0200
+++ glibc-2.18/crypt/Makefile 2013-08-17 14:40:27.546601713 +0200
@@ -20,13 +20,13 @@
# #
subdir := crypt subdir := crypt
@ -15,11 +41,10 @@ diff -p -up glibc-2.10.1/crypt/Makefile.orig glibc-2.10.1/crypt/Makefile
- crypt_util - crypt_util
+ crypt_util crypt_blowfish x86 crypt_gensalt wrapper + crypt_util crypt_blowfish x86 crypt_gensalt wrapper
tests := cert md5c-test sha256c-test sha512c-test tests := cert md5c-test sha256c-test sha512c-test badsalttest
diff -p -up glibc-2.10.1/crypt/Versions.orig glibc-2.10.1/crypt/Versions --- glibc-2.18/crypt/Versions.owlCrypt~ 2013-08-11 00:52:55.000000000 +0200
--- glibc-2.10.1/crypt/Versions.orig 2000-03-03 21:47:30.000000000 -0300 +++ glibc-2.18/crypt/Versions 2013-08-17 14:38:07.574351607 +0200
+++ glibc-2.10.1/crypt/Versions 2009-05-26 23:58:49.000000000 -0300
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
libcrypt { libcrypt {
GLIBC_2.0 { GLIBC_2.0 {
@ -27,31 +52,3 @@ diff -p -up glibc-2.10.1/crypt/Versions.orig glibc-2.10.1/crypt/Versions
+ crypt_rn; crypt_ra; crypt_gensalt; crypt_gensalt_rn; crypt_gensalt_ra; + crypt_rn; crypt_ra; crypt_gensalt; crypt_gensalt_rn; crypt_gensalt_ra;
} }
} }
diff -p -up glibc-2.10.1/crypt/crypt-entry.c.orig glibc-2.10.1/crypt/crypt-entry.c
--- glibc-2.10.1/crypt/crypt-entry.c.orig 2007-09-19 17:37:15.000000000 -0300
+++ glibc-2.10.1/crypt/crypt-entry.c 2009-05-26 23:58:49.000000000 -0300
@@ -82,7 +82,7 @@ extern struct crypt_data _ufc_foobar;
*/
char *
-__crypt_r (key, salt, data)
+__des_crypt_r (key, salt, data)
const char *key;
const char *salt;
struct crypt_data * __restrict data;
@@ -137,6 +137,7 @@ __crypt_r (key, salt, data)
_ufc_output_conversion_r (res[0], res[1], salt, data);
return data->crypt_3_buf;
}
+#if 0
weak_alias (__crypt_r, crypt_r)
char *
@@ -160,6 +161,7 @@ crypt (key, salt)
return __crypt_r (key, salt, &_ufc_foobar);
}
+#endif
/*

View file

@ -1,20 +1,17 @@
diff -p -up glibc-2.10.1/crypt/Makefile.orig glibc-2.10.1/crypt/Makefile --- glibc-2.18/crypt/Makefile.freesec~ 2013-08-17 14:40:57.281229979 +0200
--- glibc-2.10.1/crypt/Makefile.orig 2009-05-27 00:19:48.000000000 -0300 +++ glibc-2.18/crypt/Makefile 2013-08-17 14:41:29.929821815 +0200
+++ glibc-2.10.1/crypt/Makefile 2009-05-27 00:21:27.000000000 -0300 @@ -26,7 +26,7 @@ extra-libs := libcrypt
@@ -27,7 +27,8 @@ extra-libs := libcrypt
extra-libs-others := $(extra-libs) extra-libs-others := $(extra-libs)
libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \ libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
- crypt_util crypt_blowfish x86 crypt_gensalt wrapper - crypt_util crypt_blowfish x86 crypt_gensalt wrapper
+ crypt_util crypt_blowfish x86 crypt_gensalt crypt_freesec \ + crypt_util crypt_blowfish x86 crypt_gensalt crypt_freesec wrapper
+ wrapper
tests := cert md5c-test sha256c-test sha512c-test tests := cert md5c-test sha256c-test sha512c-test badsalttest
diff -p -up glibc-2.10.1/crypt/wrapper.c.orig glibc-2.10.1/crypt/wrapper.c --- glibc-2.18/crypt/wrapper.c.freesec~ 2011-07-16 17:07:22.000000000 +0200
--- glibc-2.10.1/crypt/wrapper.c.orig 2006-03-05 11:28:17.000000000 -0300 +++ glibc-2.18/crypt/wrapper.c 2013-08-17 14:40:57.282229966 +0200
+++ glibc-2.10.1/crypt/wrapper.c 2009-05-27 00:20:03.000000000 -0300 @@ -103,32 +103,72 @@ static char *_crypt_retval_magic(char *r
@@ -105,32 +105,72 @@ static char *_crypt_retval_magic(char *r
* its initialization code. Thus, it is important that our multiple hashing * its initialization code. Thus, it is important that our multiple hashing
* algorithms either don't conflict with each other in their use of the * algorithms either don't conflict with each other in their use of the
* data area or reset the initialized field themselves whenever required. * data area or reset the initialized field themselves whenever required.
@ -62,6 +59,7 @@ diff -p -up glibc-2.10.1/crypt/wrapper.c.orig glibc-2.10.1/crypt/wrapper.c
- if (setting[0] == '$' || setting[0] == '_') { - if (setting[0] == '$' || setting[0] == '_') {
- __set_errno(EINVAL); - __set_errno(EINVAL);
- return NULL; - return NULL;
- }
+ if (setting[0] == '$') goto out_einval; + if (setting[0] == '$') goto out_einval;
+ if (setting[0] == '_') { + if (setting[0] == '_') {
+ if (size < sizeof(struct _crypt_extended_data)) goto out_erange; + if (size < sizeof(struct _crypt_extended_data)) goto out_erange;
@ -73,7 +71,7 @@ diff -p -up glibc-2.10.1/crypt/wrapper.c.orig glibc-2.10.1/crypt/wrapper.c
+ (struct _crypt_extended_data *)data); + (struct _crypt_extended_data *)data);
+ if (!retval) goto out_einval; + if (!retval) goto out_einval;
+ return retval; + return retval;
} + }
if (size >= sizeof(struct crypt_data)) if (size >= sizeof(struct crypt_data))
return __des_crypt_r(key, setting, (struct crypt_data *)data); return __des_crypt_r(key, setting, (struct crypt_data *)data);
+ +
@ -94,7 +92,7 @@ diff -p -up glibc-2.10.1/crypt/wrapper.c.orig glibc-2.10.1/crypt/wrapper.c
if (setting[0] == '$' && setting[1] == '2') { if (setting[0] == '$' && setting[1] == '2') {
if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE))
return NULL; return NULL;
@@ -141,13 +181,27 @@ char *__crypt_ra(__const char *key, __co @@ -139,13 +179,27 @@ char *__crypt_ra(__const char *key, __co
return NULL; return NULL;
return __md5_crypt_r(key, setting, (char *)*data, *size); return __md5_crypt_r(key, setting, (char *)*data, *size);
} }

View file

@ -0,0 +1,11 @@
--- libc/scripts/check-local-headers.sh.multiarch~ 2012-11-17 18:50:14.000000000 +0100
+++ libc/scripts/check-local-headers.sh 2012-12-27 20:01:52.821383910 +0100
@@ -33,7 +33,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(.*-.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|gd|nss3/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)"
+ "/(.*-.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|multiarch-|gd|nss3/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

View file

@ -1,6 +1,6 @@
--- glibc-2.14-121-g5551a7b/nss/nsswitch.c.nss-upgrade 2011-07-20 02:41:44.000000000 +0200 --- libc/nss/nsswitch.c.nssUpgrade~ 2012-10-10 17:35:46.000000000 +0200
+++ glibc-2.14-121-g5551a7b/nss/nsswitch.c 2011-07-24 01:06:25.658666115 +0200 +++ libc/nss/nsswitch.c 2012-12-27 20:00:24.390443900 +0100
@@ -330,9 +330,20 @@ nss_load_library (service_user *ni) @@ -399,9 +399,20 @@ nss_load_library (service_user *ni)
ni->library->lib_handle = __libc_dlopen (shlib_name); ni->library->lib_handle = __libc_dlopen (shlib_name);
if (ni->library->lib_handle == NULL) if (ni->library->lib_handle == NULL)
{ {
@ -22,5 +22,5 @@
+ __set_errno (saved_errno); + __set_errno (saved_errno);
+ } + }
} }
# ifdef USE_NSCD
else if (is_nscd) else if (is_nscd)
{

View file

@ -34,7 +34,7 @@
+shadow: files nis +shadow: files nis
+group: compat +group: compat
+ +
+hosts: files nis dns wins +hosts: files nis dns wins myhostname
+networks: files +networks: files
+ +
+services: files +services: files

View file

@ -0,0 +1,22 @@
--- glibc-2.16.90-97bc38d7/Makeconfig.orig 2012-09-26 13:48:22.726000556 -0300
+++ glibc-2.16.90-97bc38d7/Makeconfig 2012-09-26 13:48:36.276000993 -0300
@@ -216,7 +216,7 @@ inst_zonedir = $(install_root)$(zonedir)
# Where to install the locale files.
ifndef localedir
-localedir = $(libdir)/locale
+localedir = $(datadir)/locale
endif
inst_localedir = $(install_root)$(localedir)
--- glibc-2.16.90-97bc38d7/sysdeps/gnu/configure.ac.orig 2012-09-27 13:08:49.949074767 -0300
+++ glibc-2.16.90-97bc38d7/sysdeps/gnu/configure.ac 2012-09-27 13:09:22.748076063 -0300
@@ -18,7 +18,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
+ libc_cv_localedir='${exec_prefix}/share/locale'
fi
;;
*)

View file

@ -0,0 +1,44 @@
--- glibc-2.16.90-97bc38d7/misc/tst-error1.c.orig 2012-09-26 15:21:29.672179348 -0300
+++ glibc-2.16.90-97bc38d7/misc/tst-error1.c 2012-09-26 15:21:59.422180301 -0300
@@ -16,8 +16,8 @@ do_test (int argc, char *argv[])
for (int i = 0; i < 1000; ++i)
memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
error (0, 0, str);
- error (0, 0, buf);
- error (0, 0, buf);
+ error (0, 0, "%s", buf);
+ error (0, 0, "%s", buf);
error (0, 0, str);
return 0;
}
--- glibc-2.16.90-97bc38d7/posix/regexbug1.c.orig 2012-09-26 15:23:13.175182590 -0300
+++ glibc-2.16.90-97bc38d7/posix/regexbug1.c 2012-09-26 15:23:32.198183235 -0300
@@ -18,7 +18,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
@@ -35,7 +35,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
--- glibc-2.16.90-97bc38d7/stdio-common/test-vfprintf.c.orig 2012-09-26 15:23:52.887183970 -0300
+++ glibc-2.16.90-97bc38d7/stdio-common/test-vfprintf.c 2012-09-26 15:24:13.870184603 -0300
@@ -92,7 +92,7 @@ main (void)
fprintf (fp, "%s", large);
fprintf (fp, "%.*s", 30000, large);
large[20000] = '\0';
- fprintf (fp, large);
+ fprintf (fp, "%s", large);
fprintf (fp, "%-1.300000000s", "hello");
if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0)

View file

@ -1,6 +1,6 @@
--- glibc-2.4.90/stdlib/Makefile.testsuite-ldbl-bits 2006-03-20 04:39:04.000000000 -0500 --- glibc-2.18/stdlib/Makefile.ldbl~ 2013-08-17 14:29:53.818524404 +0200
+++ glibc-2.4.90/stdlib/Makefile 2006-07-21 05:39:34.000000000 -0400 +++ glibc-2.18/stdlib/Makefile 2013-08-17 14:36:20.568689362 +0200
@@ -124,9 +124,14 @@ ifeq (no,$(cross-compiling)) @@ -130,9 +130,15 @@ ifeq ($(run-built-tests),yes)
tests: $(objpfx)tst-fmtmsg.out tests: $(objpfx)tst-fmtmsg.out
endif endif
@ -11,7 +11,7 @@
+endif +endif
$(objpfx)isomac.out: $(objpfx)isomac $(objpfx)isomac.out: $(objpfx)isomac
$(dir $<)$(notdir $<) '$(CC)' \ $(dir $<)$(notdir $<) '$(CC)' \
- '-I../include $(+sysdep-includes) $(sysincludes) -I..' > $<.out '-I../include $(+sysdep-includes) $(sysincludes) -I..' > $<.out
+ '$(isomac-includes)' > $<.out + '$(isomac-includes)' > $<.out
isomac-CFLAGS = -O isomac-CFLAGS = -O

View file

@ -0,0 +1,16 @@
--- glibc-2.18/rt/Makefile.tsp~ 2013-08-17 14:36:45.795373985 +0200
+++ glibc-2.18/rt/Makefile 2013-08-17 14:37:45.341629554 +0200
@@ -73,3 +73,13 @@ $(addprefix $(objpfx),$(tests)): $(objpf
endif
tst-mqueue7-ARGS = -- $(host-test-program-cmd)
+
+# XXX avoid timing issues on fine-grained SMT systems
+ifeq (powerpc, $(base-machine))
+no-parallel-testing = yes
+endif
+ifneq ($(filter %tests,$(MAKECMDGOALS)),)
+ifeq ($(no-parallel-testing),yes)
+.NOTPARALLEL:
+endif
+endif

View file

@ -1,30 +0,0 @@
Index: sysdeps/unix/sysv/linux/i386/sysdep.h
===================================================================
--- sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
+++ sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#if defined __i686 && defined __ASSEMBLER__
+#undef __i686
+#define __i686 __i686
+#endif
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
Index: nptl/sysdeps/pthread/pt-initfini.c
===================================================================
--- nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
+++ nptl/sysdeps/pthread/pt-initfini.c (working copy)
@@ -45,6 +45,11 @@
/* Embed an #include to pull in the alignment and .end directives. */
asm ("\n#include \"defs.h\"");
+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
+asm ("\n#undef __i686");
+asm ("\n#define __i686 __i686");
+asm ("\n#endif");
+
/* The initial common code ends here. */
asm ("\n/*@HEADER_ENDS*/");

View file

@ -1,88 +0,0 @@
--- glibc-2.14-394-g8f3b1ff/misc/tst-error1.c.str_fmt~ 2011-12-10 21:54:40.788761731 +0100
+++ glibc-2.14-394-g8f3b1ff/misc/tst-error1.c 2011-12-10 21:54:42.945752731 +0100
@@ -16,8 +16,8 @@ do_test (int argc, char *argv[])
for (int i = 0; i < 1000; ++i)
memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
error (0, 0, str);
- error (0, 0, buf);
- error (0, 0, buf);
+ error (0, 0, "%s", buf);
+ error (0, 0, "%s", buf);
error (0, 0, str);
return 0;
}
--- glibc-2.14-394-g8f3b1ff/posix/regexbug1.c.str_fmt~ 2011-12-10 21:53:53.809968992 +0100
+++ glibc-2.14-394-g8f3b1ff/posix/regexbug1.c 2011-12-10 21:53:56.247957690 +0100
@@ -18,7 +18,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
@@ -35,7 +35,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
--- glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c.str_fmt~ 2011-12-10 21:54:12.799882569 +0100
+++ glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c 2011-12-10 21:55:02.557672892 +0100
@@ -93,7 +93,7 @@ main (void)
fprintf (fp, "%s", large);
fprintf (fp, "%.*s", 30000, large);
large[20000] = '\0';
- fprintf (fp, large);
+ fprintf (fp, "%s", large);
fprintf (fp, "%-1.300000000s", "hello");
if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0)
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c 2011-12-10 20:44:52.677364034 +0100
@@ -579,7 +579,7 @@ pdeclaration (const char *name, declarat
break;
}
}
- f_print (fout, separator);
+ f_print (fout, "%s", separator);
}
static int
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c 2011-12-10 20:44:52.683364028 +0100
@@ -651,7 +651,7 @@ h_output (const char *infile, const char
}
else if (tblflag)
{
- fprintf (fout, rpcgen_table_dcl);
+ fprintf (fout, "%s", rpcgen_table_dcl);
}
if (Cflag)
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c 2011-12-10 20:44:52.707364008 +0100
@@ -361,7 +361,7 @@ write_real_program (const definition * d
f_print (fout, " (");
/* arg name */
if (proc->arg_num > 1)
- f_print (fout, proc->args.argname);
+ f_print (fout, "%s", proc->args.argname);
else
ptype (proc->args.decls->decl.prefix,
proc->args.decls->decl.type, 0);
--- glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/dl-osinfo.h.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/dl-osinfo.h 2011-12-10 20:44:52.713364002 +0100
@@ -35,7 +35,7 @@ static void
__attribute__ ((__noreturn__))
dl_fatal (const char *str)
{
- _dl_dprintf (2, str);
+ _dl_dprintf (2, "%s", str);
_exit (1);
}
#endif

View file

@ -1,13 +0,0 @@
--- glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile.orig 2011-07-30 19:11:27.590451172 -0300
+++ glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile 2011-07-30 19:11:57.813615252 -0300
@@ -33,6 +33,10 @@ ifeq ($(subdir),nscd)
nscd-modules += libc-do-syscall
endif
+ifeq ($(subdir),nss)
+libnss_db-sysdep_routines += libc-do-syscall
+endif
+
ifeq ($(subdir),posix)
LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o

View file

@ -1,11 +0,0 @@
--- glibc-2.14-121-g5551a7b/streams/Makefile.fed_streams~ 2011-07-27 15:13:29.702467500 +0000
+++ glibc-2.14-121-g5551a7b/streams/Makefile 2011-07-27 15:13:33.772466409 +0000
@@ -21,7 +21,7 @@
#
subdir := streams
-#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
+headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
include ../Rules

View file

@ -1,12 +0,0 @@
--- glibc-2.15-a316c1f/nscd/nscd_helper.c.orig 2012-02-11 20:25:37.804514879 -0200
+++ glibc-2.15-a316c1f/nscd/nscd_helper.c 2012-02-11 20:26:07.428588082 -0200
@@ -414,7 +414,8 @@ __nscd_get_mapping (request_type type, c
struct mapped_database *oldval = *mappedp;
*mappedp = result;
- if (oldval != NULL && atomic_decrement_val (&oldval->counter) == 0)
+ if (oldval != NULL && oldval != NO_MAPPING
+ && atomic_decrement_val (&oldval->counter) == 0)
__nscd_unmap (oldval);
return result;

View file

@ -1,11 +0,0 @@
--- glibc-2.15-a316c1f/scripts/check-local-headers.sh.orig 2012-02-11 17:00:16.708816468 -0200
+++ glibc-2.15-a316c1f/scripts/check-local-headers.sh 2012-02-11 17:00:35.235895337 -0200
@@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
+ "/(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

View file

@ -1,17 +0,0 @@
diff -Naur glibc-2.15-a316c1f.orig/po/ru.po glibc-2.15-a316c1f/po/ru.po
--- glibc-2.15-a316c1f.orig/po/ru.po 2013-12-11 08:56:53.067231149 -0500
+++ glibc-2.15-a316c1f/po/ru.po 2013-12-11 09:03:28.133235667 -0500
@@ -3033,11 +3033,11 @@
#: nis/nis_error.h:1 nis/ypclnt.c:833 nis/ypclnt.c:921 posix/regcomp.c:132
#: sysdeps/gnu/errlist.c:20
msgid "Success"
-msgstr "Победа"
+msgstr "Выполнено"
#: nis/nis_error.h:2
msgid "Probable success"
-msgstr "Вероятный успех"
+msgstr "Вероятно выполнено"
#: nis/nis_error.h:3
msgid "Not found"

21
glibc-2.17-gold.patch Normal file
View file

@ -0,0 +1,21 @@
diff --git a/configure.ac b/configure.ac
index d369382..ffc6151 100644
--- a/configure.ac
+++ b/configure.ac
@@ -924,6 +924,16 @@ AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in
AC_CHECK_PROG_VER(AS, $AS, --version,
[GNU assembler.* \([0-9]*\.[0-9.]*\)],
[2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as")
+# If the system defaulted to using gold, and the compiler has suggested
+# we use a linker that is actually gold, then we ignore the suggestion
+# and use ld.bfd instead. This won't fix the implicit uses of gold by
+# the compiler, but it will correctly use the bfd ld for assembling
+# the library.
+gnu_ld_name="`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"
+if test "$gnu_ld_name" = "gold"; then
+ AC_MSG_NOTICE([$LD is actually gold using ld.bfd instead])
+ LD=ld.bfd
+fi
AC_CHECK_PROG_VER(LD, $LD, --version,
[GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
[2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld")

11
glibc-2.19.tar.xz.sig Normal file
View file

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAABAgAGBQJS9Q/LAAoJECXvCkNsKkr/tgEH+wf5M8BU9gbVncXh5mikpKIe
V81RjOJVP0TI8ix7Eq+GHqPVDDVCHupX81u87VbETRd+8sJMlXQa1fep0y7T8GV4
LiapkkBPbC7wGQ6h1jpDE4hQhCiHLYWgDgGhj6qtTQIvhqR5/B5927UKfw7imhHD
805UZdO8ryHCWbWAeOljPA3spz0DKtUe/eskWFEdBparSbpEEmaQiHlT+6mGy4Xy
mUe0BqXSWFFq/gmZT7DpJxAW7WnO8iwc2/NUli/dl1dSd2cMHlEJ96ZcJ4NKKf7j
AxaVwLr6zgyfORaEt28+JAf8nDXIsztTqtNBU5YrJpMmYo0e9v/Zao0G+zbIsWo=
=IQM8
-----END PGP SIGNATURE-----

View file

@ -1,24 +0,0 @@
2006-07-26 Gwenole Beauchesne <gbeauchesne@mandriva.com>
* rt/Makefile (tests): Don't run tests in parallel on fine-grained
SMT systems.
--- glibc-2.4.90/rt/Makefile.testsuite-rt-notparallel 2006-02-16 09:32:18.000000000 -0500
+++ glibc-2.4.90/rt/Makefile 2006-10-25 03:00:03.000000000 -0400
@@ -81,6 +81,16 @@ endif
tst-mqueue7-ARGS = -- $(built-program-cmd)
+# XXX avoid timing issues on fine-grained SMT systems
+ifeq (powerpc, $(base-machine))
+no-parallel-testing = yes
+endif
+ifneq ($(filter %tests,$(MAKECMDGOALS)),)
+ifeq ($(no-parallel-testing),yes)
+.NOTPARALLEL:
+endif
+endif
+
ifeq (yes,$(build-static-nss))
otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
$(resolvobjdir)/libresolv.a

View file

@ -1,49 +0,0 @@
diff -Naurp glibc-2.14-121-g5551a7b/crypt/crypt-entry.c glibc-2.14-121-g5551a7b.oden/crypt/crypt-entry.c
--- glibc-2.14-121-g5551a7b/crypt/crypt-entry.c 2011-11-25 05:00:43.214487962 -0500
+++ glibc-2.14-121-g5551a7b.oden/crypt/crypt-entry.c 2011-11-25 05:04:42.044487854 -0500
@@ -164,18 +164,3 @@ crypt (key, salt)
#endif
-/*
- * To make fcrypt users happy.
- * They don't need to call init_des.
- */
-#ifdef _LIBC
-weak_alias (crypt, fcrypt)
-#else
-char *
-__fcrypt (key, salt)
- const char *key;
- const char *salt;
-{
- return crypt (key, salt);
-}
-#endif
diff -Naurp glibc-2.14-121-g5551a7b/crypt/wrapper.c glibc-2.14-121-g5551a7b.oden/crypt/wrapper.c
--- glibc-2.14-121-g5551a7b/crypt/wrapper.c 2011-11-25 05:00:43.224487962 -0500
+++ glibc-2.14-121-g5551a7b.oden/crypt/wrapper.c 2011-11-25 05:05:14.264487791 -0500
@@ -324,7 +324,22 @@ weak_alias(__crypt, crypt)
weak_alias(__crypt_gensalt_rn, crypt_gensalt_rn)
weak_alias(__crypt_gensalt_ra, crypt_gensalt_ra)
weak_alias(__crypt_gensalt, crypt_gensalt)
-weak_alias(crypt, fcrypt)
+#endif
+
+/*
+ * To make fcrypt users happy.
+ * They don't need to call init_des.
+ */
+#ifdef _LIBC
+weak_alias (crypt, fcrypt)
+#else
+char *
+__fcrypt (key, salt)
+ const char *key;
+ const char *salt;
+{
+ return crypt (key, salt);
+}
#endif
#ifdef TEST

View file

@ -1,36 +0,0 @@
diff -p -up glibc-2.9/Makeconfig.orig glibc-2.9/Makeconfig
--- glibc-2.9/Makeconfig.orig 2008-08-18 05:42:17.000000000 -0400
+++ glibc-2.9/Makeconfig 2009-01-15 09:44:31.000000000 -0500
@@ -226,7 +226,7 @@ inst_zonedir = $(install_root)$(zonedir)
# Where to install the locale files.
ifndef localedir
-localedir = $(libdir)/locale
+localedir = $(datadir)/locale
endif
inst_localedir = $(install_root)$(localedir)
diff -p -up glibc-2.9/sysdeps/unix/sysv/linux/configure.in.orig glibc-2.9/sysdeps/unix/sysv/linux/configure.in
--- glibc-2.9/sysdeps/unix/sysv/linux/configure.in.orig 2008-04-11 17:13:38.000000000 -0400
+++ glibc-2.9/sysdeps/unix/sysv/linux/configure.in 2009-01-15 09:44:31.000000000 -0500
@@ -169,7 +169,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
+ libc_cv_localedir='${datadir}/locale'
fi
;;
*)
diff -p -up glibc-2.9/sysdeps/unix/sysv/linux/configure.orig glibc-2.9/sysdeps/unix/sysv/linux/configure
--- glibc-2.9/sysdeps/unix/sysv/linux/configure.orig 2008-04-11 17:13:51.000000000 -0400
+++ glibc-2.9/sysdeps/unix/sysv/linux/configure 2009-01-15 09:44:31.000000000 -0500
@@ -381,7 +381,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
+ libc_cv_localedir='${datadir}/locale'
fi
;;
*)

View file

@ -0,0 +1,20 @@
diff -Nrup a/elf/dl-load.c b/elf/dl-load.c
--- a/elf/dl-load.c 2012-06-06 13:07:41.727524312 -0600
+++ b/elf/dl-load.c 2012-06-06 13:11:19.308681002 -0600
@@ -2093,10 +2093,14 @@ _dl_map_object (struct link_map *loader,
soname = ((const char *) D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_SONAME]->d_un.d_val);
if (strcmp (name, soname) != 0)
- continue;
+#ifdef __arm__
+ if (strcmp (name, "ld-linux.so.3")
+ || strcmp (soname, "ld-linux-armhf.so.3"))
+#endif
+ continue;
/* We have a match on a new name -- cache it. */
- add_name_to_object (l, soname);
+ add_name_to_object (l, name);
l->l_soname_added = 1;
}

View file

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

View file

@ -0,0 +1,101 @@
From 207e77fd3f0a94acdf0557608dd4f10ce0e0f22f Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Mon, 9 May 2011 10:55:58 +0200
Subject: [PATCH] Never leave $ORIGIN unexpanded
* elf/dl-load.c (is_dst): Remove parameter secure, all callers
changed. Move check for valid use of $ORIGIN ...
(_dl_dst_substitute): ... here. Reset check_for_trusted when a
path element is skipped.
---
ChangeLog | 7 +++++++
elf/dl-load.c | 34 ++++++++++++++++------------------
2 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 18a83d2..6e16a9a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -249,8 +249,7 @@ is_trusted_path_normalize (const char *path, size_t len)
static size_t
-is_dst (const char *start, const char *name, const char *str,
- int is_path, int secure)
+is_dst (const char *start, const char *name, const char *str, int is_path)
{
size_t len;
bool is_curly = false;
@@ -279,12 +278,6 @@ is_dst (const char *start, const char *name, const char *str,
&& (!is_path || name[len] != ':'))
return 0;
- if (__builtin_expect (secure, 0)
- && ((name[len] != '\0' && name[len] != '/'
- && (!is_path || name[len] != ':'))
- || (name != start + 1 && (!is_path || name[-2] != ':'))))
- return 0;
-
return len;
}
@@ -299,13 +292,10 @@ _dl_dst_count (const char *name, int is_path)
{
size_t len;
- /* $ORIGIN is not expanded for SUID/GUID programs (except if it
- is $ORIGIN alone) and it must always appear first in path. */
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0
- || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
- || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0
+ || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
+ || (len = is_dst (start, name, "LIB", is_path)) != 0)
++cnt;
name = strchr (name + len, '$');
@@ -338,10 +328,18 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
size_t len;
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
{
- repl = l->l_origin;
+ /* For SUID/GUID programs $ORIGIN must always appear
+ first in a path element. */
+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0)
+ && ((name[len] != '\0' && name[len] != '/'
+ && (!is_path || name[len] != ':'))
+ || (name != start + 1 && (!is_path || name[-2] != ':'))))
+ repl = (const char *) -1;
+ else
+ repl = l->l_origin;
+
check_for_trusted = (INTUSE(__libc_enable_secure)
&& l->l_type == lt_executable);
}
@@ -351,9 +348,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
check_for_trusted = (INTUSE(__libc_enable_secure)
&& l->l_type == lt_executable);
}
- else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
repl = GLRO(dl_platform);
- else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
repl = DL_DST_LIB;
if (repl != NULL && repl != (const char *) -1)
@@ -373,6 +370,7 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
element, but keep an empty element at the end. */
if (wp == result && is_path && *name == ':' && name[1] != '\0')
++name;
+ check_for_trusted = false;
}
else
/* No DST we recognize. */

View file

@ -0,0 +1,30 @@
* Fri May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-44
- make __init_array_start etc. symbols in elf-init.oS hidden undefined
diff -Nrup a/csu/elf-init.c b/csu/elf-init.c
--- a/csu/elf-init.c 2012-06-05 07:42:49.000000000 -0600
+++ b/csu/elf-init.c 2012-06-07 12:15:21.570319597 -0600
@@ -62,6 +62,23 @@ extern void _fini (void);
programs, this module will come from libc_nonshared.a and differs from
the libc.a module in that it doesn't call the preinit array. */
+#if defined HAVE_VISIBILITY_ATTRIBUTE \
+ && (defined SHARED || defined LIBC_NONSHARED)
+# define hidden_undef_2(x) #x
+# define hidden_undef_1(x) hidden_undef_2 (x)
+# define hidden_undef(x) \
+ __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
+ __asm (".hidden " #x);
+#else
+# define hidden_undef(x)
+#endif
+
+hidden_undef (__preinit_array_start)
+hidden_undef (__preinit_array_end)
+hidden_undef (__init_array_start)
+hidden_undef (__init_array_end)
+hidden_undef (__fini_array_start)
+hidden_undef (__fini_array_end)
void
__libc_csu_init (int argc, char **argv, char **envp)

View file

@ -0,0 +1,15 @@
Binary files a/elf/.rtld.c.rej.swp and b/elf/.rtld.c.rej.swp differ
diff -Nrup a/elf/setup-vdso.h b/elf/setup-vdso.h
--- a/elf/setup-vdso.h 2012-10-10 21:34:38.000000000 -0600
+++ b/elf/setup-vdso.h 2012-10-11 09:43:14.152958832 -0600
@@ -93,7 +93,9 @@ setup_vdso (struct link_map *main_map __
char *copy = malloc (len);
if (copy == NULL)
_dl_fatal_printf ("out of memory\n");
- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
+ l->l_libname->name = memcpy (copy, dsoname, len);
+ if (GLRO(dl_debug_mask))
+ l->l_name = copy;
}
/* Add the vDSO to the object list. */

View file

@ -0,0 +1,45 @@
From 70d0a630700f602a457832383161d261fe222db5 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 1 Jul 2010 13:14:26 +0200
Subject: [PATCH] Fix PLT reference
* include/sys/resource.h (__getrlimit): Add hidden proto.
* sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
* sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
* resource/getrlimit.c: Likewise.
---
ChangeLog | 7 +++++++
include/sys/resource.h | 1 +
resource/getrlimit.c | 1 +
sysdeps/mach/hurd/getrlimit.c | 1 +
sysdeps/unix/sysv/linux/i386/getrlimit.c | 1 +
5 files changed, 11 insertions(+), 0 deletions(-)
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -14,5 +14,6 @@ extern int __getrusage (enum __rusage_who __who, struct rusage *__usage)
extern int __setrlimit (enum __rlimit_resource __resource,
const struct rlimit *__rlimits);
+libc_hidden_proto (__getrlimit)
#endif
#endif
--- a/resource/getrlimit.c
+++ b/resource/getrlimit.c
@@ -27,6 +27,7 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__getrlimit)
weak_alias (__getrlimit, getrlimit)
stub_warning (getrlimit)
--- a/sysdeps/mach/hurd/getrlimit.c
+++ b/sysdeps/mach/hurd/getrlimit.c
@@ -43,4 +43,5 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
return 0;
}
+libc_hidden_def (__getrlimit)
weak_alias (__getrlimit, getrlimit)

View file

@ -0,0 +1,18 @@
diff -Nrup a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
--- a/sysdeps/i386/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/sysdeps/i386/Makefile 2012-06-07 12:15:21.826318641 -0600
@@ -62,6 +64,14 @@ endif
ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
defines += -DNO_TLS_DIRECT_SEG_REFS
+else
+# .a libraries are not performance critical and so we
+# build them without direct TLS segment references
+# always.
+CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS
+CFLAGS-.o += -mno-tls-direct-seg-refs
+CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS
+CFLAGS-.oS += -mno-tls-direct-seg-refs
endif
ifeq ($(subdir),elf)

View file

@ -0,0 +1,30 @@
From 5eb4509a6651d19c7a28c4506d6aa582c9ee095a Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Wed, 1 Feb 2006 09:30:43 +0000
Subject: [PATCH] 128-bit long double fixes
* include/bits/stdlib-ldbl.h: New file.
* include/bits/wchar-ldbl.h: New file.
---
ChangeLog | 5 +++++
include/bits/stdlib-ldbl.h | 1 +
include/bits/wchar-ldbl.h | 1 +
3 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 include/bits/stdlib-ldbl.h
create mode 100644 include/bits/wchar-ldbl.h
diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
new file mode 100644
index 0000000..6250949
--- /dev/null
+++ b/include/bits/stdlib-ldbl.h
@@ -0,0 +1 @@
+#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/include/bits/wchar-ldbl.h b/include/bits/wchar-ldbl.h
new file mode 100644
index 0000000..29baa2f
--- /dev/null
+++ b/include/bits/wchar-ldbl.h
@@ -0,0 +1 @@
+#include <wcsmbs/bits/wchar-ldbl.h>

42
glibc-fedora-ldd.patch Normal file
View file

@ -0,0 +1,42 @@
From 83e5edd390eabe8f8e8e0d051f929b77a30c0767 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Fri, 18 Mar 2011 16:22:52 +0100
Subject: [PATCH] ldd: never run file directly
* elf/ldd.bash.in: Never run file directly.
---
ChangeLog | 4 ++++
elf/ldd.bash.in | 14 +-------------
2 files changed, 5 insertions(+), 13 deletions(-)
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -166,18 +166,6 @@ warning: you do not have execution permission for" "\`$file'" >&2
fi
done
case $ret in
- 0)
- # If the program exits with exit code 5, it means the process has been
- # invoked with __libc_enable_secure. Fall back to running it through
- # the dynamic linker.
- try_trace "$file"
- rc=$?
- if [ $rc = 5 ]; then
- try_trace "$RTLD" "$file"
- rc=$?
- fi
- [ $rc = 0 ] || result=1
- ;;
1)
# This can be a non-ELF binary or no binary at all.
nonelf "$file" || {
@@ -185,7 +173,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
result=1
}
;;
- 2)
+ 0|2)
try_trace "$RTLD" "$file" || result=1
;;
*)

View file

@ -0,0 +1,48 @@
diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c
--- a/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-05 07:42:49.000000000 -0600
+++ b/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-07 12:15:21.831318623 -0600
@@ -48,6 +48,7 @@ tcsetattr (fd, optional_actions, termios
{
struct __kernel_termios k_termios;
unsigned long int cmd;
+ int retval;
switch (optional_actions)
{
@@ -79,6 +80,35 @@ tcsetattr (fd, optional_actions, termios
memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
__KERNEL_NCCS * sizeof (cc_t));
- return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
+ retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
+
+ if (retval == 0 && cmd == TCSETS)
+ {
+ /* The Linux kernel has a bug which silently ignore the invalid
+ c_cflag on pty. We have to check it here. */
+ int save = errno;
+ retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
+ if (retval)
+ {
+ /* We cannot verify if the setting is ok. We don't return
+ an error (?). */
+ __set_errno (save);
+ retval = 0;
+ }
+ else if ((termios_p->c_cflag & (PARENB | CREAD))
+ != (k_termios.c_cflag & (PARENB | CREAD))
+ || ((termios_p->c_cflag & CSIZE)
+ && ((termios_p->c_cflag & CSIZE)
+ != (k_termios.c_cflag & CSIZE))))
+ {
+ /* It looks like the Linux kernel silently changed the
+ PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
+ error. */
+ __set_errno (EINVAL);
+ retval = -1;
+ }
+ }
+
+ return retval;
}
libc_hidden_def (tcsetattr)

View file

@ -0,0 +1,38 @@
* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28
- add a couple of .ISO-8859-15 locales (#61908)
diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
--- a/localedata/SUPPORTED 2012-11-25 12:59:31.000000000 -0700
+++ b/localedata/SUPPORTED 2012-11-26 12:58:43.298223018 -0700
@@ -89,6 +89,7 @@ cy_GB.UTF-8/UTF-8 \
cy_GB/ISO-8859-14 \
da_DK.UTF-8/UTF-8 \
da_DK/ISO-8859-1 \
+da_DK.ISO-8859-15/ISO-8859-15 \
de_AT.UTF-8/UTF-8 \
de_AT/ISO-8859-1 \
de_AT@euro/ISO-8859-15 \
@@ -121,6 +122,7 @@ en_DK.UTF-8/UTF-8 \
en_DK/ISO-8859-1 \
en_GB.UTF-8/UTF-8 \
en_GB/ISO-8859-1 \
+en_GB.ISO-8859-15/ISO-8859-15 \
en_HK.UTF-8/UTF-8 \
en_HK/ISO-8859-1 \
en_IE.UTF-8/UTF-8 \
@@ -136,6 +138,7 @@ en_SG.UTF-8/UTF-8 \
en_SG/ISO-8859-1 \
en_US.UTF-8/UTF-8 \
en_US/ISO-8859-1 \
+en_US.ISO-8859-15/ISO-8859-15 \
en_ZA.UTF-8/UTF-8 \
en_ZA/ISO-8859-1 \
en_ZM/UTF-8 \
@@ -385,6 +388,7 @@ sv_FI/ISO-8859-1 \
sv_FI@euro/ISO-8859-15 \
sv_SE.UTF-8/UTF-8 \
sv_SE/ISO-8859-1 \
+sv_SE.ISO-8859-15/ISO-8859-15 \
sw_KE/UTF-8 \
sw_TZ/UTF-8 \
szl_PL/UTF-8 \

View file

@ -0,0 +1,11 @@
diff -Nrup a/localedata/Makefile b/localedata/Makefile
--- a/localedata/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/Makefile 2012-06-07 12:15:21.776318827 -0600
@@ -211,6 +211,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo
echo -n '...'; \
input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
$(LOCALEDEF) --alias-file=../intl/locale.alias \
+ --no-archive \
-i locales/$$input -c -f charmaps/$$charset \
$(addprefix --prefix=,$(install_root)) $$locale; \
echo ' done'; \

View file

@ -0,0 +1,51 @@
This is a part of commit glibc-2.3.3-1492-ga891c7b,
needed for fedora/build-locale-archive.c only.
diff -Nrup a/ChangeLog.17 b/ChangeLog.17
--- a/ChangeLog.17 2012-06-05 07:42:49.000000000 -0600
+++ b/ChangeLog.17 2012-06-07 12:15:21.564319619 -0600
@@ -11818,6 +11829,10 @@ d2009-10-30 Ulrich Drepper <drepper@re
[BZ #4368]
* stdlib/stdlib.h: Remove obsolete part of comment for realpath.
+2007-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ * locale/programs/locarchive.c (add_alias, insert_name): Remove static.
+
2007-04-16 Ulrich Drepper <drepper@redhat.com>
[BZ #4364]
diff -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c
--- a/locale/programs/locarchive.c 2012-06-05 07:42:49.000000000 -0600
+++ b/locale/programs/locarchive.c 2012-06-07 12:15:21.585319540 -0600
@@ -252,9 +252,9 @@ oldlocrecentcmp (const void *a, const vo
/* forward decls for below */
static uint32_t add_locale (struct locarhandle *ah, const char *name,
locale_data_t data, bool replace);
-static void add_alias (struct locarhandle *ah, const char *alias,
- bool replace, const char *oldname,
- uint32_t *locrec_offset_p);
+void add_alias (struct locarhandle *ah, const char *alias,
+ bool replace, const char *oldname,
+ uint32_t *locrec_offset_p);
static bool
@@ -635,7 +635,7 @@ close_archive (struct locarhandle *ah)
#include "../../intl/explodename.c"
#include "../../intl/l10nflist.c"
-static struct namehashent *
+struct namehashent *
insert_name (struct locarhandle *ah,
const char *name, size_t name_len, bool replace)
{
@@ -693,7 +693,7 @@ insert_name (struct locarhandle *ah,
return &namehashtab[idx];
}
-static void
+void
add_alias (struct locarhandle *ah, const char *alias, bool replace,
const char *oldname, uint32_t *locrec_offset_p)
{

View file

@ -0,0 +1,20 @@
From 4820b9175535e13df79ce816106016040014916e Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Fri, 3 Nov 2006 16:31:21 +0000
Subject: [PATCH] Change @dircategory.
---
manual/libc.texinfo | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--- a/manual/libc.texinfo
+++ b/manual/libc.texinfo
@@ -7,7 +7,7 @@
@include macros.texi
@comment Tell install-info what to do.
-@dircategory Software libraries
+@dircategory Libraries
@direntry
* Libc: (libc). C library.
@end direntry

View file

@ -0,0 +1,21 @@
From baba5d9461d4e8a581ac26fe4412ad783ffc73e7 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Mon, 1 May 2006 08:02:53 +0000
Subject: [PATCH] Enable SETENT_BATCH_READ nis/nss option by default
* Mon May 1 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-4
- SETENT_BATCH_READ /etc/default/nss option for speeding up
some usages of NIS+ (#188246)
diff --git a/nis/nss b/nis/nss
--- a/nis/nss
+++ b/nis/nss
@@ -25,7 +25,7 @@
# memory with every getXXent() call. Otherwise each getXXent() call
# might result into a network communication with the server to get
# the next entry.
-#SETENT_BATCH_READ=TRUE
+SETENT_BATCH_READ=TRUE
#
# ADJUNCT_AS_SHADOW
# If set to TRUE, the passwd routines in the NIS NSS module will not

View file

@ -0,0 +1,25 @@
diff -Nrup a/nptl/Makefile b/nptl/Makefile
--- a/nptl/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/nptl/Makefile 2012-06-07 12:15:21.816318678 -0600
@@ -529,15 +529,19 @@ $(addprefix $(objpfx), \
$(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
$(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
# since otherwise libpthread.so comes before libc.so when linking.
$(addprefix $(objpfx), $(tests-reverse)): \
- $(objpfx)../libc.so $(objpfx)libpthread.so \
+ $(objpfx)linklibc.so $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
$(objpfx)../libc.so: $(common-objpfx)libc.so ;
$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
$(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
+
+$(objpfx)linklibc.so: $(common-objpfx)libc.so
+ ln -s ../libc.so $@
+generated += libclink.so
else
$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
endif

12
glibc-fedora-nscd.patch Normal file
View file

@ -0,0 +1,12 @@
diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf
--- a/nscd/nscd.conf 2012-06-05 07:42:49.000000000 -0600
+++ b/nscd/nscd.conf 2012-06-07 12:15:21.818318670 -0600
@@ -33,7 +33,7 @@
# logfile /var/log/nscd.log
# threads 4
# max-threads 32
-# server-user nobody
+ server-user nscd
# stat-user somebody
debug-level 0
# reload-count 5

View file

@ -0,0 +1,20 @@
glibc-2.3.3-1478-g37582bc
* Thu Nov 30 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-9
- on ppc64 build __libc_start_main without unwind info,
as it breaks MD_FROB_UPDATE_CONTEXT (#217729, #217775; in the
future that could be fixable just by providing .cfi_undefined r2
in __libc_start_main instead)
diff -Nrup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
--- a/sysdeps/powerpc/powerpc64/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/sysdeps/powerpc/powerpc64/Makefile 2012-06-07 12:15:21.828318633 -0600
@@ -35,6 +35,8 @@ CFLAGS-rtld-memmove.os = $(no-special-re
CFLAGS-rtld-memchr.os = $(no-special-regs)
CFLAGS-rtld-strnlen.os = $(no-special-regs)
+CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
+
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing

View file

@ -0,0 +1,61 @@
From cde99cd2b7b16a6113acb054e89d490047932a9f Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 8 Apr 2010 11:18:26 +0200
Subject: [PATCH] Don't call uname or getrlimit in libpthread init function
* sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
GLIBC_PRIVATE.
* nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
* sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
* nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
---
ChangeLog | 8 ++++++++
nptl/Versions | 1 +
nptl/nptl-init.c | 2 +-
nptl/sysdeps/unix/sysv/linux/i386/Versions | 6 ++++++
nptl/sysdeps/unix/sysv/linux/i386/smp.h | 2 +-
5 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/Versions
--- a/nptl/Version
+++ b/nptl/Versions
@@ -30,6 +30,7 @@ libc {
__libc_alloca_cutoff;
# Internal libc interface to libpthread
__libc_dl_error_tsd;
+ __getrlimit;
}
}
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (void)
/* Determine the default allowed stack size. This is the size used
in case the user does not specify one. */
struct rlimit limit;
- if (getrlimit (RLIMIT_STACK, &limit) != 0
+ if (__getrlimit (RLIMIT_STACK, &limit) != 0
|| limit.rlim_cur == RLIM_INFINITY)
/* The system limit is not usable. Use an architecture-specific
default. */
--- a/nptl/sysdeps/unix/sysv/linux/i386/Versions
+++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_PRIVATE {
+ # Internal libc interface to libpthread
+ __uname;
+ }
+}
--- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h
@@ -36,7 +36,7 @@ is_smp_system (void)
char *cp;
/* Try reading the number using `sysctl' first. */
- if (uname (&u.uts) == 0)
+ if (__uname (&u.uts) == 0)
cp = u.uts.version;
else
{

File diff suppressed because it is too large Load diff

View file

@ -1,157 +0,0 @@
diff -Nrup a/elf/dl-close.c b/elf/dl-close.c
--- a/elf/dl-close.c 2012-01-25 21:49:58.892869984 -0700
+++ b/elf/dl-close.c 2012-01-25 21:50:22.283882509 -0700
@@ -32,6 +32,7 @@
#include <sys/mman.h>
#include <sysdep-cancel.h>
#include <tls.h>
+#include <stap-probe.h>
/* Type of the constructor functions. */
@@ -469,6 +470,7 @@ _dl_close_worker (struct link_map *map)
struct r_debug *r = _dl_debug_initialize (0, nsid);
r->r_state = RT_DELETE;
_dl_debug_state ();
+ LIBC_PROBE (rtld_unmap_start, 2, nsid, r);
if (unload_global)
{
@@ -738,6 +740,7 @@ _dl_close_worker (struct link_map *map)
/* Notify the debugger those objects are finalized and gone. */
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_unmap_complete, 2, nsid, r);
/* Recheck if we need to retry, release the lock. */
out:
diff -Nrup a/elf/dl-load.c b/elf/dl-load.c
--- a/elf/dl-load.c 2012-01-25 21:49:58.895869986 -0700
+++ b/elf/dl-load.c 2012-01-25 21:50:22.288882511 -0700
@@ -36,6 +36,7 @@
#include <stackinfo.h>
#include <caller.h>
#include <sysdep.h>
+#include <stap-probe.h>
#include <dl-dst.h>
@@ -881,7 +882,7 @@ _dl_init_paths (const char *llp)
static void
__attribute__ ((noreturn, noinline))
lose (int code, int fd, const char *name, char *realname, struct link_map *l,
- const char *msg, struct r_debug *r)
+ const char *msg, struct r_debug *r, Lmid_t nsid)
{
/* The file might already be closed. */
if (fd != -1)
@@ -895,6 +896,7 @@ lose (int code, int fd, const char *name
{
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_complete, 2, nsid, r);
}
_dl_signal_error (code, name, NULL, msg);
@@ -933,7 +935,7 @@ _dl_map_object_from_fd (const char *name
errval = errno;
call_lose:
lose (errval, fd, name, realname, l, errstring,
- make_consistent ? r : NULL);
+ make_consistent ? r : NULL, nsid);
}
/* Look again to see if the real name matched another already loaded. */
@@ -1040,6 +1042,7 @@ _dl_map_object_from_fd (const char *name
linking has not been used before. */
r->r_state = RT_ADD;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_start, 2, nsid, r);
make_consistent = true;
}
else
@@ -1735,7 +1738,7 @@ open_verify (const char *name, struct fi
name = strdupa (realname);
free (realname);
}
- lose (errval, fd, name, NULL, NULL, errstring, NULL);
+ lose (errval, fd, name, NULL, NULL, errstring, NULL, 0);
}
/* See whether the ELF header is what we expect. */
diff -Nrup a/elf/dl-open.c b/elf/dl-open.c
--- a/elf/dl-open.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-open.c 2012-01-25 21:50:22.291882514 -0700
@@ -33,6 +33,7 @@
#include <caller.h>
#include <sysdep-cancel.h>
#include <tls.h>
+#include <stap-probe.h>
#include <dl-dst.h>
@@ -292,6 +293,7 @@ dl_open_worker (void *a)
struct r_debug *r = _dl_debug_initialize (0, args->nsid);
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_complete, 2, args->nsid, r);
/* Print scope information. */
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
@@ -308,10 +310,18 @@ dl_open_worker (void *a)
struct link_map *l = new;
while (l->l_next)
l = l->l_next;
+ int relocation_in_progress = 0;
while (1)
{
if (! l->l_real->l_relocated)
{
+ if (! relocation_in_progress)
+ {
+ /* Notify the debugger that relocations are about to happen. */
+ LIBC_PROBE (rtld_reloc_start, 2, args->nsid, r);
+ relocation_in_progress = 1;
+ }
+
#ifdef SHARED
if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
{
@@ -481,6 +491,10 @@ cannot load any more object with static
}
}
+ /* Notify the debugger all new objects have been relocated. */
+ if (relocation_in_progress)
+ LIBC_PROBE (rtld_reloc_complete, 2, args->nsid, r);
+
/* Run the initializer functions of new objects. */
_dl_init (new, args->argc, args->argv, args->env);
diff -Nrup a/elf/rtld.c b/elf/rtld.c
--- a/elf/rtld.c 2012-01-25 21:49:58.898869987 -0700
+++ b/elf/rtld.c 2012-01-25 21:53:42.262987201 -0700
@@ -40,6 +40,7 @@
#include <dl-osinfo.h>
#include <dl-procinfo.h>
#include <tls.h>
+#include <stap-probe.h>
#include <stackinfo.h>
#include <assert.h>
@@ -1670,6 +1671,7 @@ ERROR: ld.so: object '%s' cannot be load
/* We start adding objects. */
r->r_state = RT_ADD;
_dl_debug_state ();
+ LIBC_PROBE (rtld_init_start, 2, LM_ID_BASE, r);
/* Auditing checkpoint: we are ready to signal that the initial map
is being constructed. */
@@ -2382,6 +2384,7 @@ ERROR: ld.so: object '%s' cannot be load
r = _dl_debug_initialize (0, LM_ID_BASE);
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_init_complete, 2, LM_ID_BASE, r);
#ifndef MAP_COPY
/* We must munmap() the cache file. */

View file

@ -1,13 +0,0 @@
diff --git a/localedata/locales/it_IT b/localedata/locales/it_IT
index 31acd53..9513970 100644
--- a/localedata/locales/it_IT
+++ b/localedata/locales/it_IT
@@ -124,6 +124,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025>/
<U0062><U0020><U0025><U0059><U002C><U0020><U0025><U0048><U002E>/
<U0025><U004D><U002E><U0025><U0053><U002C><U0020><U0025><U005A>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER

View file

@ -1,13 +0,0 @@
diff --git a/localedata/locales/ca_ES b/localedata/locales/ca_ES
index cd83bcc..3c14340 100644
--- a/localedata/locales/ca_ES
+++ b/localedata/locales/ca_ES
@@ -138,6 +138,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER

View file

@ -1,27 +0,0 @@
diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:49:42.609737373 -0700
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:52:00.962150379 -0700
@@ -438,6 +438,10 @@ __pthread_cond_wait:
addl $1, cond_futex(%ebx)
movl cond_futex(%ebx), %ebp
+ /* Increment total_seq to ensure we do not lose wakeups. */
+ addl $1, total_seq(%ebx)
+ adcl $0, total_seq+4(%ebx)
+
/* Unlock. */
LOCK
#if cond_lock == 0
diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:49:42.612737361 -0700
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:52:36.179000963 -0700
@@ -366,6 +366,9 @@ __pthread_cond_wait:
incl cond_futex(%rdi)
movl cond_futex(%rdi), %edx
+ /* Increment total_seq to ensure we do not lose wakeups. */
+ incq total_seq(%rdi)
+
/* Release internal lock. */
LOCK
#if cond_lock == 0

View file

@ -1,12 +0,0 @@
diff -rup a/manual/stdio.texi b/manual/stdio.texi
--- a/manual/stdio.texi 2012-01-01 05:16:32.000000000 -0700
+++ b/manual/stdio.texi 2012-02-09 23:46:31.660912211 -0700
@@ -2324,6 +2324,8 @@ the @var{size} argument specifies the ma
produce. The trailing null character is counted towards this limit, so
you should allocate at least @var{size} characters for the string @var{s}.
+The trailing null byte is added to @var{s}, unless @var{size} is zero.
+
The return value is the number of characters which would be generated
for the given input, excluding the trailing null. If this value is
greater or equal to @var{size}, not all characters from the result have

View file

@ -1,13 +0,0 @@
diff --git a/localedata/locales/lt_LT b/localedata/locales/lt_LT
index b709d83..63cb6de 100644
--- a/localedata/locales/lt_LT
+++ b/localedata/locales/lt_LT
@@ -2191,6 +2191,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_MESSAGES

View file

@ -1,13 +0,0 @@
diff -rup a/localedata/locales/ru_UA b/localedata/locales/ru_UA
--- a/localedata/locales/ru_UA 2012-01-01 05:16:32.000000000 -0700
+++ b/localedata/locales/ru_UA 2012-02-09 22:57:29.698433625 -0700
@@ -141,6 +141,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER
Only in b/localedata/locales: uk_UA.rej

View file

@ -1,20 +0,0 @@
diff -rup a/localedata/locales/zh_CN b/localedata/locales/zh_CN
--- a/localedata/locales/zh_CN 2006-07-30 16:19:43.000000000 -0600
+++ b/localedata/locales/zh_CN 2012-01-30 21:24:46.905115483 -0700
@@ -108,11 +108,11 @@ day "<U661F><U671F><U65E5>";/
"<U661F><U671F><U4E94>";/
"<U661F><U671F><U516D>"
-abmon "<U0020><U0031><U6708>";"<U0020><U0032><U6708>";/
- "<U0020><U0033><U6708>";"<U0020><U0034><U6708>";/
- "<U0020><U0035><U6708>";"<U0020><U0036><U6708>";/
- "<U0020><U0037><U6708>";"<U0020><U0038><U6708>";/
- "<U0020><U0039><U6708>";"<U0031><U0030><U6708>";/
+abmon "<U0031><U6708>";"<U0032><U6708>";/
+ "<U0033><U6708>";"<U0034><U6708>";/
+ "<U0035><U6708>";"<U0036><U6708>";/
+ "<U0037><U6708>";"<U0038><U6708>";/
+ "<U0039><U6708>";"<U0031><U0030><U6708>";/
"<U0031><U0031><U6708>";"<U0031><U0032><U6708>"
mon "<U4E00><U6708>";"<U4E8C><U6708>";"<U4E09><U6708>";/

View file

@ -1,37 +0,0 @@
diff -rNup a/fedora/glibc_post_upgrade.c b/fedora/glibc_post_upgrade.c
--- a/fedora/glibc_post_upgrade.c 2011-10-19 05:04:41.000000000 -0600
+++ b/fedora/glibc_post_upgrade.c 2012-02-06 11:02:03.236713830 -0700
@@ -60,6 +60,7 @@ is_ia64 (void)
int
main (void)
{
+ struct stat statbuf;
char initpath[256];
char buffer[4096];
@@ -170,12 +171,24 @@ main (void)
|| ((!!access ("/dev/initctl", F_OK))
^ !access ("/sbin/initctl", X_OK)))
_exit (0);
+
/* Check if we are not inside of some chroot, because we'd just
- timeout and leave /etc/initrunlvl. */
+ timeout and leave /etc/initrunlvl.
+
+ On more modern systems this test is not sufficient to detect
+ if we're in a chroot. */
if (readlink ("/proc/1/exe", initpath, 256) <= 0 ||
readlink ("/proc/1/root", initpath, 256) <= 0)
_exit (0);
+ /* Here's another well known way to detect chroot, at least on an
+ ext and xfs filesystems and assuming nothing mounted on the chroot's
+ root. */
+ if (stat ("/", &statbuf) != 0
+ || (statbuf.st_ino != 2
+ && statbuf.st_ino != 128))
+ _exit (0);
+
if (check_elf ("/proc/1/exe"))
verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u");

View file

@ -1,11 +0,0 @@
diff -rup a/sunrpc/etc.rpc b/sunrpc/etc.rpc
--- a/sunrpc/etc.rpc 2012-01-01 05:16:32.000000000 -0700
+++ b/sunrpc/etc.rpc 2012-02-03 14:24:45.615462110 -0700
@@ -62,6 +62,7 @@ sadmind 100232
nisd 100300 rpc.nisd
nispasswd 100303 rpc.nispasswdd
ufsd 100233 ufsd
+fedfs_admin 100418
pcnfsd 150001 pcnfs
amd 300019 amq
sgi_fam 391002 fam

View file

@ -1,56 +0,0 @@
diff -rup a/elf/dl-deps.c b/elf/dl-deps.c
--- a/elf/dl-deps.c 2012-01-23 14:28:15.888185967 -0700
+++ b/elf/dl-deps.c 2012-01-23 14:29:11.620197431 -0700
@@ -634,7 +634,7 @@ Filters not supported with LD_TRACE_PREL
/* We can skip looking for the binary itself which is at the front
of the search list. */
i = 1;
- char seen[nlist];
+ uint16_t seen[nlist];
memset (seen, 0, nlist * sizeof (seen[0]));
while (1)
{
@@ -660,13 +660,13 @@ Filters not supported with LD_TRACE_PREL
(k - i) * sizeof (l_initfini[0]));
l_initfini[k] = thisp;
- if (seen[i + 1] > 1)
+ if (seen[i + 1] > nlist - i)
{
++i;
goto next_clear;
}
- char this_seen = seen[i];
+ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1],
(k - i) * sizeof (seen[0]));
seen[k] = this_seen;
diff -rup a/elf/dl-fini.c b/elf/dl-fini.c
--- a/elf/dl-fini.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-fini.c 2012-01-23 14:29:39.661203226 -0700
@@ -39,7 +39,7 @@ _dl_sort_fini (struct link_map **maps, s
/* We can skip looking for the binary itself which is at the front
of the search list for the main namespace. */
unsigned int i = ns == LM_ID_BASE;
- char seen[nmaps];
+ uint16_t seen[nmaps];
memset (seen, 0, nmaps * sizeof (seen[0]));
while (1)
{
@@ -79,13 +79,13 @@ _dl_sort_fini (struct link_map **maps, s
used[k] = here_used;
}
- if (seen[i + 1] > 1)
+ if (seen[i + 1] > nmaps - i)
{
++i;
goto next_clear;
}
- char this_seen = seen[i];
+ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
seen[k] = this_seen;

View file

@ -1,16 +0,0 @@
2011-09-01 Andreas Schwab <schwab@redhat.com>
* resolv/res_query.c (__libc_res_nquery): Update assertion.
diff -ru a/resolv/res_query.c b/resolv/res_query.c
--- a/resolv/res_query.c 2011-12-12 14:10:52.000000000 -0700
+++ b/resolv/res_query.c 2011-12-12 14:23:04.832739111 -0700
@@ -248,7 +248,7 @@
&& *resplen2 > (int) sizeof (HEADER))
{
/* Special case of partial answer. */
- assert (hp != hp2);
+ assert (n == 0 || hp != hp2);
hp = hp2;
}
else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)

View file

@ -1,40 +0,0 @@
* malloc/arena.c (arena_get2): Avoid unnecessarily
retrieving #cpus from /proc.
* malloc/malloc.c (mALLOPt): Clamp arena_test based on
the value of arena_max.
commit 41b81892f11fe1353123e892158b53de73863d62
Author: Ulrich Drepper <drepper@gmail.com>
Date: Tue Jan 31 14:42:34 2012 -0500
Handle ARENA_TEST correctly
diff --git a/malloc/arena.c b/malloc/arena.c
index d3cf4b9..b1c9469 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -828,7 +828,7 @@ arena_get2(mstate a_tsd, size_t size)
{
if (mp_.arena_max != 0)
narenas_limit = mp_.arena_max;
- else
+ else if (narenas > mp_.arena_test)
{
int n = __get_nprocs ();
@@ -842,7 +842,14 @@ arena_get2(mstate a_tsd, size_t size)
}
repeat:;
size_t n = narenas;
- if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
+ /* NB: the following depends on the fact that (size_t)0 - 1 is a
+ very large number and that the underflow is OK. If arena_max
+ is set the value of arena_test is irrelevant. If arena_test
+ is set but narenas is not yet larger or equal to arena_test
+ narenas_limit is 0. There is no possibility for narenas to
+ be too big for the test to always fail since there is not
+ enough address space to create that many arenas. */
+ if (__builtin_expect (n <= narenas_limit - 1, 0))
{
if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
goto repeat;

View file

@ -1,12 +0,0 @@
diff -rup a/time/sys/time.h b/time/sys/time.h
--- a/time/sys/time.h 2012-01-01 05:16:32.000000000 -0700
+++ b/time/sys/time.h 2012-01-26 11:16:44.309112430 -0700
@@ -78,7 +78,7 @@ extern int gettimeofday (struct timeval
This call is restricted to the super-user. */
extern int settimeofday (__const struct timeval *__tv,
__const struct timezone *__tz)
- __THROW __nonnull ((1));
+ __THROW;
/* Adjust the current time of day by the amount in DELTA.
If OLDDELTA is not NULL, it is filled in with the amount

View file

@ -1,8 +1,7 @@
Index: glibc-2.12-2-gc4ccff1/malloc/arena.c diff -Nrup a/malloc/arena.c b/malloc/arena.c
=================================================================== --- a/malloc/arena.c 2012-05-29 16:45:53.000000000 -0600
--- glibc-2.12-2-gc4ccff1.orig/malloc/arena.c +++ b/malloc/arena.c 2012-05-30 00:13:40.683514016 -0600
+++ glibc-2.12-2-gc4ccff1/malloc/arena.c @@ -673,7 +673,7 @@ heap_trim(heap_info *heap, size_t pad)
@@ -870,7 +870,7 @@ heap_trim(heap, pad) heap_info *heap; si
heap = prev_heap; heap = prev_heap;
if(!prev_inuse(p)) { /* consolidate backward */ if(!prev_inuse(p)) { /* consolidate backward */
p = prev_chunk(p); p = prev_chunk(p);
@ -11,11 +10,10 @@ Index: glibc-2.12-2-gc4ccff1/malloc/arena.c
} }
assert(((unsigned long)((char*)p + new_size) & (pagesz-1)) == 0); assert(((unsigned long)((char*)p + new_size) & (pagesz-1)) == 0);
assert( ((char*)p + new_size) == ((char*)heap + heap->size) ); assert( ((char*)p + new_size) == ((char*)heap + heap->size) );
Index: glibc-2.12-2-gc4ccff1/malloc/hooks.c diff -Nrup a/malloc/hooks.c b/malloc/hooks.c
=================================================================== --- a/malloc/hooks.c 2012-05-29 16:45:53.000000000 -0600
--- glibc-2.12-2-gc4ccff1.orig/malloc/hooks.c +++ b/malloc/hooks.c 2012-05-30 00:13:40.684514011 -0600
+++ glibc-2.12-2-gc4ccff1/malloc/hooks.c @@ -191,7 +191,9 @@ top_check(void)
@@ -219,7 +219,9 @@ top_check()
(char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem))) (char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem)))
return 0; return 0;
@ -25,11 +23,10 @@ Index: glibc-2.12-2-gc4ccff1/malloc/hooks.c
/* Try to set up a new top chunk. */ /* Try to set up a new top chunk. */
brk = MORECORE(0); brk = MORECORE(0);
Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c diff -Nrup a/malloc/malloc.c b/malloc/malloc.c
=================================================================== --- a/malloc/malloc.c 2012-05-29 16:45:53.000000000 -0600
--- glibc-2.12-2-gc4ccff1.orig/malloc/malloc.c +++ b/malloc/malloc.c 2012-05-30 00:13:40.686514001 -0600
+++ glibc-2.12-2-gc4ccff1/malloc/malloc.c @@ -1424,12 +1424,14 @@ typedef struct malloc_chunk* mbinptr;
@@ -1541,12 +1541,14 @@
#define last(b) ((b)->bk) #define last(b) ((b)->bk)
/* Take a chunk off a bin list */ /* Take a chunk off a bin list */
@ -47,7 +44,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
FD->bk = BK; \ FD->bk = BK; \
BK->fd = FD; \ BK->fd = FD; \
if (!in_smallbin_range (P->size) \ if (!in_smallbin_range (P->size) \
@@ -2593,7 +2595,9 @@ @@ -2511,7 +2513,9 @@ static void* sysmalloc(INTERNAL_SIZE_T n
else if (contiguous(av) && old_size && brk < old_end) { else if (contiguous(av) && old_size && brk < old_end) {
/* Oops! Someone else killed our space.. Can't touch anything. */ /* Oops! Someone else killed our space.. Can't touch anything. */
@ -57,7 +54,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
} }
/* /*
@@ -3467,7 +3471,9 @@ @@ -3345,7 +3349,9 @@ _int_malloc(mstate av, size_t bytes)
{ {
errstr = "malloc(): memory corruption (fast)"; errstr = "malloc(): memory corruption (fast)";
errout: errout:
@ -67,7 +64,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
return NULL; return NULL;
} }
check_remalloced_chunk(av, victim, nb); check_remalloced_chunk(av, victim, nb);
@@ -3552,8 +3558,12 @@ @@ -3430,8 +3436,12 @@ _int_malloc(mstate av, size_t bytes)
bck = victim->bk; bck = victim->bk;
if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0) if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0)
|| __builtin_expect (victim->size > av->system_mem, 0)) || __builtin_expect (victim->size > av->system_mem, 0))
@ -82,7 +79,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
size = chunksize(victim); size = chunksize(victim);
/* /*
@@ -3694,7 +3704,7 @@ @@ -3572,7 +3582,7 @@ _int_malloc(mstate av, size_t bytes)
victim = victim->fd; victim = victim->fd;
remainder_size = size - nb; remainder_size = size - nb;
@ -91,7 +88,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
/* Exhaust */ /* Exhaust */
if (remainder_size < MINSIZE) { if (remainder_size < MINSIZE) {
@@ -3792,7 +3802,7 @@ @@ -3670,7 +3680,7 @@ _int_malloc(mstate av, size_t bytes)
remainder_size = size - nb; remainder_size = size - nb;
/* unlink */ /* unlink */
@ -100,7 +97,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
/* Exhaust */ /* Exhaust */
if (remainder_size < MINSIZE) { if (remainder_size < MINSIZE) {
@@ -3927,9 +3937,11 @@ @@ -3805,9 +3815,11 @@ _int_free(mstate av, mchunkptr p, int ha
{ {
errstr = "free(): invalid pointer"; errstr = "free(): invalid pointer";
errout: errout:
@ -112,8 +109,8 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
+ mutex_lock(&av->mutex); + mutex_lock(&av->mutex);
return; return;
} }
/* We know that each chunk is at least MINSIZE bytes in size. */ /* We know that each chunk is at least MINSIZE bytes in size or a
@@ -4073,7 +4085,7 @@ @@ -3952,7 +3964,7 @@ _int_free(mstate av, mchunkptr p, int ha
prevsize = p->prev_size; prevsize = p->prev_size;
size += prevsize; size += prevsize;
p = chunk_at_offset(p, -((long) prevsize)); p = chunk_at_offset(p, -((long) prevsize));
@ -122,7 +119,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
} }
if (nextchunk != av->top) { if (nextchunk != av->top) {
@@ -4082,7 +4094,7 @@ @@ -3961,7 +3973,7 @@ _int_free(mstate av, mchunkptr p, int ha
/* consolidate forward */ /* consolidate forward */
if (!nextinuse) { if (!nextinuse) {
@ -131,7 +128,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
size += nextsize; size += nextsize;
} else } else
clear_inuse_bit_at_offset(nextchunk, 0); clear_inuse_bit_at_offset(nextchunk, 0);
@@ -4243,7 +4255,7 @@ @@ -4122,7 +4134,7 @@ static void malloc_consolidate(mstate av
prevsize = p->prev_size; prevsize = p->prev_size;
size += prevsize; size += prevsize;
p = chunk_at_offset(p, -((long) prevsize)); p = chunk_at_offset(p, -((long) prevsize));
@ -140,7 +137,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
} }
if (nextchunk != av->top) { if (nextchunk != av->top) {
@@ -4251,7 +4263,7 @@ @@ -4130,7 +4142,7 @@ static void malloc_consolidate(mstate av
if (!nextinuse) { if (!nextinuse) {
size += nextsize; size += nextsize;
@ -149,7 +146,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
} else } else
clear_inuse_bit_at_offset(nextchunk, 0); clear_inuse_bit_at_offset(nextchunk, 0);
@@ -4320,7 +4332,9 @@ @@ -4199,7 +4211,9 @@ _int_realloc(mstate av, mchunkptr oldp,
{ {
errstr = "realloc(): invalid old size"; errstr = "realloc(): invalid old size";
errout: errout:
@ -159,7 +156,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
return NULL; return NULL;
} }
@@ -4362,7 +4376,7 @@ @@ -4241,7 +4255,7 @@ _int_realloc(mstate av, mchunkptr oldp,
(unsigned long)(newsize = oldsize + nextsize) >= (unsigned long)(newsize = oldsize + nextsize) >=
(unsigned long)(nb)) { (unsigned long)(nb)) {
newp = oldp; newp = oldp;

View file

@ -1,223 +0,0 @@
diff -urN glibc-2.15-a316c1f/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S glibc-2.15-a316c1f-patched/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
--- glibc-2.15-a316c1f/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-09-22 01:54:22.146388310 +1100
+++ glibc-2.15-a316c1f-patched/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-09-22 01:56:28.364389765 +1100
@@ -137,7 +137,6 @@
cmpl $PI_BIT, %eax
jne 18f
-90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
movl %ebp, %edx
xorl %esi, %esi
@@ -151,9 +150,6 @@
sete 16(%esp)
je 19f
- cmpl $-EAGAIN, %eax
- je 91f
-
/* Normal and PI futexes dont mix. Use normal futex functions only
if the kernel does not support the PI futex functions. */
cmpl $-ENOSYS, %eax
@@ -399,81 +395,6 @@
call __lll_unlock_wake
jmp 11b
-91:
-.LcleanupSTART2:
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
- call it again. */
-
- /* Get internal lock. */
- movl $1, %edx
- xorl %eax, %eax
- LOCK
-#if cond_lock == 0
- cmpxchgl %edx, (%ebx)
-#else
- cmpxchgl %edx, cond_lock(%ebx)
-#endif
- jz 92f
-
-#if cond_lock == 0
- movl %ebx, %edx
-#else
- leal cond_lock(%ebx), %edx
-#endif
-#if (LLL_SHARED-LLL_PRIVATE) > 255
- xorl %ecx, %ecx
-#endif
- cmpl $-1, dep_mutex(%ebx)
- setne %cl
- subl $1, %ecx
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
- addl $LLL_PRIVATE, %ecx
-#endif
- call __lll_lock_wait
-
-92:
- /* Increment the cond_futex value again, so it can be used as a new
- expected value. */
- addl $1, cond_futex(%ebx)
- movl cond_futex(%ebx), %ebp
-
- /* Increment total_seq to ensure we do not lose wakeups. */
- addl $1, total_seq(%ebx)
- adcl $0, total_seq+4(%ebx)
-
- /* Unlock. */
- LOCK
-#if cond_lock == 0
- subl $1, (%ebx)
-#else
- subl $1, cond_lock(%ebx)
-#endif
- je 93f
-#if cond_lock == 0
- movl %ebx, %eax
-#else
- leal cond_lock(%ebx), %eax
-#endif
-#if (LLL_SHARED-LLL_PRIVATE) > 255
- xorl %ecx, %ecx
-#endif
- cmpl $-1, dep_mutex(%ebx)
- setne %cl
- subl $1, %ecx
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
- addl $LLL_PRIVATE, %ecx
-#endif
- call __lll_unlock_wake
-
-93:
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
- xorl %ecx, %ecx
- movl dep_mutex(%ebx), %edi
- jmp 90b
-.LcleanupEND2:
-
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -646,10 +567,6 @@
.long .LcleanupEND-.Lsub_cond_futex
.long __condvar_w_cleanup-.LSTARTCODE
.uleb128 0
- .long .LcleanupSTART2-.LSTARTCODE
- .long .LcleanupEND2-.LcleanupSTART2
- .long __condvar_w_cleanup-.LSTARTCODE
- .uleb128 0
.long .LcallUR-.LSTARTCODE
.long .LENDCODE-.LcallUR
.long 0
diff -urN glibc-2.15-a316c1f/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S glibc-2.15-a316c1f-patched/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
--- glibc-2.15-a316c1f/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-09-22 01:54:22.147388310 +1100
+++ glibc-2.15-a316c1f-patched/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-09-22 01:57:12.518392542 +1100
@@ -137,14 +137,11 @@
cmpl $PI_BIT, %eax
jne 61f
-90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
movl $SYS_futex, %eax
syscall
movl $1, %r8d
- cmpq $-EAGAIN, %rax
- je 91f
#ifdef __ASSUME_REQUEUE_PI
jmp 62f
#else
@@ -332,72 +329,6 @@
13: movq %r10, %rax
jmp 14b
-91:
-.LcleanupSTART2:
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
- call it again. */
- movq 8(%rsp), %rdi
-
- /* Get internal lock. */
- movl $1, %esi
- xorl %eax, %eax
- LOCK
-#if cond_lock == 0
- cmpxchgl %esi, (%rdi)
-#else
- cmpxchgl %esi, cond_lock(%rdi)
-#endif
- jz 92f
-
-#if cond_lock != 0
- addq $cond_lock, %rdi
-#endif
- cmpq $-1, dep_mutex-cond_lock(%rdi)
- movl $LLL_PRIVATE, %eax
- movl $LLL_SHARED, %esi
- cmovne %eax, %esi
- callq __lll_lock_wait
-#if cond_lock != 0
- subq $cond_lock, %rdi
-#endif
-92:
- /* Increment the cond_futex value again, so it can be used as a new
- expected value. */
- incl cond_futex(%rdi)
- movl cond_futex(%rdi), %edx
-
- /* Increment total_seq to ensure we do not lose wakeups. */
- incq total_seq(%rdi)
-
- /* Release internal lock. */
- LOCK
-#if cond_lock == 0
- decl (%rdi)
-#else
- decl cond_lock(%rdi)
-#endif
- jz 93f
-
-#if cond_lock != 0
- addq $cond_lock, %rdi
-#endif
- cmpq $-1, dep_mutex-cond_lock(%rdi)
- movl $LLL_PRIVATE, %eax
- movl $LLL_SHARED, %esi
- cmovne %eax, %esi
- /* The call preserves %rdx. */
- callq __lll_unlock_wake
-#if cond_lock != 0
- subq $cond_lock, %rdi
-#endif
-93:
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
- xorq %r10, %r10
- movq dep_mutex(%rdi), %r8
- leaq cond_futex(%rdi), %rdi
- jmp 90b
-.LcleanupEND2:
-
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -550,15 +481,11 @@
.uleb128 .LcleanupSTART-.LSTARTCODE
.uleb128 .LcleanupEND-.LcleanupSTART
.uleb128 __condvar_cleanup1-.LSTARTCODE
- .uleb128 0
- .uleb128 .LcleanupSTART2-.LSTARTCODE
- .uleb128 .LcleanupEND2-.LcleanupSTART2
- .uleb128 __condvar_cleanup1-.LSTARTCODE
- .uleb128 0
+ .uleb128 0
.uleb128 .LcallUR-.LSTARTCODE
.uleb128 .LENDCODE-.LcallUR
.uleb128 0
- .uleb128 0
+ .uleb128 0
.Lcstend:

View file

@ -1,22 +0,0 @@
2012-02-08 Rakesh Pandit <rakesh@fedoraproject.org>
* locales/ks_IN@devanagari: Fix week day names.
--- a/localedata/locales/ks_IN@devanagari
+++ a/localedata/locales/ks_IN@devanagari
@@ -64,11 +64,11 @@ abday "<U0906><U0925><U094D>";/
"<U092C><U091F>"
%
% Full weekday names (%A)
-day "<U0906><U0925><U094D><U094D><U0935><U093E><U0930><U094D>";/
+day "<U0906><U0925><U094D><U0935><U093E><U0930><U094D>";/
"<U091A><U0928><U094D><U0926><U094D><U0930><U0935><U093E><U0930><U094D>";/
- "<U092C><U094B><U092E><U094D><U0935><U093E><U0930><U0940><U094D>";/
- "<U092C><U094B><U0918><U0935><U093E><U0930><U0940><U094D>";/
- "<U092C><U094D><U0930><U0938><U094D><U094D><U0935><U093E><U0930><U094D>";/
+ "<U092C><U094B><U092E><U094D><U0935><U093E><U0930><U094D>";/
+ "<U092C><U094B><U0918><U0935><U093E><U0930><U094D>";/
+ "<U092C><U094D><U0930><U0938><U094D><U0935><U093E><U0930><U094D>";/
"<U091C><U0941><U092E><U093E><U0939><U094D>";/
"<U092C><U091F><U0935><U093E><U0930><U094D>"
%

View file

@ -1,121 +0,0 @@
diff -rup a/fedora/nscd.service b/fedora/nscd.service
--- a/fedora/nscd.service 2011-10-19 05:04:41.000000000 -0600
+++ b/fedora/nscd.service 2012-02-03 13:40:37.070063851 -0700
@@ -3,16 +3,15 @@ Description=Name Service Cache Daemon
After=syslog.target
[Service]
-Type=forking
EnvironmentFile=-/etc/sysconfig/nscd
-ExecStart=/usr/sbin/nscd $NSCD_OPTIONS
+ExecStart=/usr/sbin/nscd --foreground $NSCD_OPTIONS
ExecStop=/usr/sbin/nscd --shutdown
ExecReload=/usr/sbin/nscd -i passwd
ExecReload=/usr/sbin/nscd -i group
ExecReload=/usr/sbin/nscd -i hosts
-ExecReload=/usr/sbin/nscd -i service
+ExecReload=/usr/sbin/nscd -i services
+ExecReload=/usr/sbin/nscd -i netgroup
Restart=always
-PIDFile=/run/nscd/nscd.pid
[Install]
WantedBy=multi-user.target
diff -rup a/nscd/nscd.c b/nscd/nscd.c
--- a/nscd/nscd.c 2012-01-01 05:16:32.000000000 -0700
+++ b/nscd/nscd.c 2012-02-03 13:07:50.509740586 -0700
@@ -72,7 +72,12 @@ thread_info_t thread_info;
int do_shutdown;
int disabled_passwd;
int disabled_group;
-int go_background = 1;
+
+/* Default is to daemonize. Set to 1 to run in foreground in
+ debugging mode, or negative to run in foreground but otherwise
+ behave like a daemon, i.e., detach from terminal and use
+ syslog. */
+static int run_in_foreground = 0;
static const char *conffile = _PATH_NSCDCONF;
@@ -104,6 +109,8 @@ static const struct argp_option options[
N_("Read configuration data from NAME") },
{ "debug", 'd', NULL, 0,
N_("Do not fork and display messages on the current tty") },
+ { "foreground", 'F', NULL, 0,
+ N_("Do not fork, but otherwise behave like a deamon") },
{ "nthreads", 't', N_("NUMBER"), 0, N_("Start NUMBER threads") },
{ "shutdown", 'K', NULL, 0, N_("Shut the server down") },
{ "statistics", 'g', NULL, 0, N_("Print current configuration statistics") },
@@ -174,16 +181,22 @@ main (int argc, char **argv)
/* Determine page size. */
pagesize_m1 = getpagesize () - 1;
- /* Behave like a daemon. */
- if (go_background)
+ if (run_in_foreground <= 0)
{
int i;
+ pid_t pid;
- pid_t pid = fork ();
- if (pid == -1)
- error (EXIT_FAILURE, errno, _("cannot fork"));
- if (pid != 0)
- exit (0);
+ /* Behave like a daemon. */
+ if (!run_in_foreground)
+ {
+ pid = fork ();
+ if (pid == -1)
+ error (EXIT_FAILURE, errno, _("cannot fork"));
+ if (pid != 0)
+ exit (0);
+ }
+ else
+ fprintf (stderr, _("further output sent to syslog\n"));
int nullfd = open (_PATH_DEVNULL, O_RDWR);
if (nullfd != -1)
@@ -234,11 +247,14 @@ main (int argc, char **argv)
for (i = min_close_fd; i < getdtablesize (); i++)
close (i);
- pid = fork ();
- if (pid == -1)
- error (EXIT_FAILURE, errno, _("cannot fork"));
- if (pid != 0)
- exit (0);
+ if (!run_in_foreground)
+ {
+ pid = fork ();
+ if (pid == -1)
+ error (EXIT_FAILURE, errno, _("cannot fork"));
+ if (pid != 0)
+ exit (0);
+ }
setsid ();
@@ -260,7 +276,7 @@ main (int argc, char **argv)
signal (SIGTSTP, SIG_IGN);
}
else
- /* In foreground mode we are not paranoid. */
+ /* In debug mode we are not paranoid. */
paranoia = 0;
signal (SIGINT, termination_handler);
@@ -309,7 +325,11 @@ parse_opt (int key, char *arg, struct ar
{
case 'd':
++debug_level;
- go_background = 0;
+ run_in_foreground = 1;
+ break;
+
+ case 'F':
+ run_in_foreground = -1;
break;
case 'f':

View file

@ -1,12 +0,0 @@
diff -rup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
--- a/sysdeps/powerpc/powerpc64/Makefile 2012-02-01 09:34:07.018768021 -0700
+++ b/sysdeps/powerpc/powerpc64/Makefile 2012-02-01 09:35:28.813356195 -0700
@@ -31,7 +31,7 @@ elide-routines.os += hp-timing
ifneq ($(elf),no)
# The initfini generation code doesn't work in the presence of -fPIC, so
# we use -fpic instead which is much better.
-CFLAGS-initfini.s += -fpic -O1
+CFLAGS-initfini.s += -fpic -O1 -fno-inline
endif
CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
endif

View file

@ -1,144 +0,0 @@
commit 3e1aa84e7f9f38815f5db9cd7654b1a9497cf6e4
Author: Ulrich Drepper <drepper@gmail.com>
Date: Fri Jan 20 22:39:54 2012 -0500
Do not cache negative results in nscd if these are transient
diff --git a/nscd/aicache.c b/nscd/aicache.c
index aaaf80d..e1f1244 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -514,8 +514,9 @@ next_nip:
if (fd != -1)
TEMP_FAILURE_RETRY (send (fd, &notfound, total, MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store the
+ result, so be it. */
+ if (rc4 == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index e9607c6..a698f36 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -1,5 +1,5 @@
/* Cache handling for group lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -120,8 +120,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
else
written = total;
- /* If we cannot permanently store the result, so be it. */
- if (db->negtimeout == 0)
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 4d68ade..c72feaa 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -141,8 +141,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
MSG_NOSIGNAL)) != total)
all_written = false;
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
index 4ac9942..2019991 100644
--- a/nscd/initgrcache.c
+++ b/nscd/initgrcache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -202,8 +202,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
index 49e130c..e2ba09d 100644
--- a/nscd/pwdcache.c
+++ b/nscd/pwdcache.c
@@ -1,5 +1,5 @@
/* Cache handling for passwd lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -124,8 +124,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/servicescache.c b/nscd/servicescache.c
index d3d5dce..a6337e3 100644
--- a/nscd/servicescache.c
+++ b/nscd/servicescache.c
@@ -1,5 +1,5 @@
/* Cache handling for services lookup.
- Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@drepper.com>, 2007.
@@ -108,8 +108,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)

View file

@ -1,12 +0,0 @@
diff -rup a/fedora/glibc.spec.in b/fedora/glibc.spec.in
--- a/fedora/glibc.spec.in 2011-10-19 05:04:41.000000000 -0600
+++ b/fedora/glibc.spec.in 2012-02-03 09:26:36.669828253 -0700
@@ -316,7 +316,7 @@ GCC="gcc -m64"
GXX="g++ -m64"
%endif
%ifarch ppc64
-BuildFlags="-mno-minimal-toc"
+BuildFlags=
GCC="gcc -m64"
GXX="g++ -m64"
%endif

View file

@ -1,12 +0,0 @@
diff -rup a/localedata/locales/uk_UA b/localedata/locales/uk_UA
--- a/localedata/locales/uk_UA 2012-01-01 05:16:32.000000000 -0700
+++ b/localedata/locales/uk_UA 2012-02-09 22:32:36.864134146 -0700
@@ -700,7 +700,7 @@ LC_MONETARY
% 200 hrv. - 200 hryven (money)
% the local currency symbol
-currency_symbol "<U0433><U0440>" % hr (hryvnya)
+currency_symbol "<U0433><U0440><U043D><U002E>" % hr (hryvnya)
% This must be a 4-character string containing the international currency
% symbol as defined by the ISO 4217 standard (three characters) followed

78
glibc-rh800224.patch Normal file
View file

@ -0,0 +1,78 @@
2012-03-07 Jeff Law <law@redhat.com>
* elf/dl-reloc.c (_dl_relocate_object): Move code to allocate
l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE.
diff -rup a/elf/dl-reloc.c b/elf/dl-reloc.c
--- a/elf/dl-reloc.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-reloc.c 2012-03-06 15:41:56.486242640 -0700
@@ -238,32 +238,9 @@ _dl_relocate_object (struct link_map *l,
/* String table object symbols. */
const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
- /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
-#define RESOLVE_MAP(ref, version, r_type) \
- (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
- ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
- && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
- ? (bump_num_cache_relocations (), \
- (*ref) = l->l_lookup_cache.ret, \
- l->l_lookup_cache.value) \
- : ({ lookup_t _lr; \
- int _tc = elf_machine_type_class (r_type); \
- l->l_lookup_cache.type_class = _tc; \
- l->l_lookup_cache.sym = (*ref); \
- const struct r_found_version *v = NULL; \
- if ((version) != NULL && (version)->hash != 0) \
- v = (version); \
- _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
- scope, v, _tc, \
- DL_LOOKUP_ADD_DEPENDENCY, NULL); \
- l->l_lookup_cache.ret = (*ref); \
- l->l_lookup_cache.value = _lr; })) \
- : l)
-
-#include "dynamic-link.h"
-
- ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
-
+ /* ELF_DYNAMIC_RELOCATE may need to examine l_reloc_result
+ when handling MACHINE_IRELATIVE relocs. So we must
+ allocate l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE. */
#ifndef PROF
if (__builtin_expect (consider_profiling, 0))
{
@@ -290,6 +267,32 @@ _dl_relocate_object (struct link_map *l,
}
}
#endif
+
+ /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
+#define RESOLVE_MAP(ref, version, r_type) \
+ (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
+ ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
+ && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
+ ? (bump_num_cache_relocations (), \
+ (*ref) = l->l_lookup_cache.ret, \
+ l->l_lookup_cache.value) \
+ : ({ lookup_t _lr; \
+ int _tc = elf_machine_type_class (r_type); \
+ l->l_lookup_cache.type_class = _tc; \
+ l->l_lookup_cache.sym = (*ref); \
+ const struct r_found_version *v = NULL; \
+ if ((version) != NULL && (version)->hash != 0) \
+ v = (version); \
+ _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
+ scope, v, _tc, \
+ DL_LOOKUP_ADD_DEPENDENCY, NULL); \
+ l->l_lookup_cache.ret = (*ref); \
+ l->l_lookup_cache.value = _lr; })) \
+ : l)
+
+#include "dynamic-link.h"
+
+ ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
}
/* Mark the object so we know this work has been done. */

78
glibc-rh819430.patch Normal file
View file

@ -0,0 +1,78 @@
diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c
--- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500
+++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400
@@ -333,6 +333,7 @@ fnmatch (pattern, string, flags)
# if HANDLE_MULTIBYTE
if (__builtin_expect (MB_CUR_MAX, 1) != 1)
{
+ const char *orig_pattern = pattern;
mbstate_t ps;
size_t n;
const char *p;
@@ -356,10 +357,8 @@ fnmatch (pattern, string, flags)
alloca_used);
n = mbsrtowcs (wpattern, &p, n + 1, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- return -1;
+ /* Something wrong: Fall back to single byte matching. */
+ goto try_singlebyte;
if (p)
{
memset (&ps, '\0', sizeof (ps));
@@ -371,10 +370,8 @@ fnmatch (pattern, string, flags)
prepare_wpattern:
n = mbsrtowcs (NULL, &pattern, 0, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- return -1;
+ /*Something wrong: Fall back to single byte matching. */
+ goto try_singlebyte;
if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
{
__set_errno (ENOMEM);
@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags)
alloca_used);
n = mbsrtowcs (wstring, &p, n + 1, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- {
- /* Something wrong.
- XXX Do we have to set `errno' to something which
- mbsrtows hasn't already done? */
- free_return:
- free (wpattern_malloc);
- return -1;
- }
+ /* Something wrong: Fall back to single byte matching. */
+ goto free_and_try_singlebyte;
if (p)
{
memset (&ps, '\0', sizeof (ps));
@@ -420,10 +411,8 @@ fnmatch (pattern, string, flags)
prepare_wstring:
n = mbsrtowcs (NULL, &string, 0, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- goto free_return;
+ /* Something wrong: Fall back to singlebyte matching. */
+ goto free_and_try_singlebyte;
if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
{
free (wpattern_malloc);
@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags)
free (wpattern_malloc);
return res;
+ free_and_try_singlebyte:
+ free(wpattern_malloc);
+ try_singlebyte:
+ pattern = orig_pattern;
}
# endif /* mbstate_t and mbsrtowcs or _LIBC. */

13
glibc-rh825061.patch Normal file
View file

@ -0,0 +1,13 @@
diff -rup a/manual/Makefile b/manual/Makefile
--- a/manual/Makefile 2012-05-20 19:47:38.000000000 -0600
+++ b/manual/Makefile 2012-05-29 22:23:33.920428631 -0600
@@ -129,7 +129,8 @@ $(objpfx)%.c.texi: examples/%.c
mv -f $@.new $@
$(objpfx)%.info: %.texinfo
- LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=$@ $<
+ LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=`basename $@` $<
+ mv `basename $@`* $(objpfx)
$(objpfx)%.dvi: %.texinfo
cd $(objpfx);$(TEXI2DVI) -I $(shell cd $(<D) && pwd) --output=$@ \

27
glibc-rh827510.patch Normal file
View file

@ -0,0 +1,27 @@
2012-06-14 Jeff Law <law@redhat.com>
* locale/loadlocale.c (_nl_load_locale): Delay setting
file->decided until we have successfully loaded the file's
data.
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index e3fa187..9fd9216 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -169,7 +169,6 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
int save_err;
int alloc = ld_mapped;
- file->decided = 1;
file->data = NULL;
fd = open_not_cancel_2 (file->filename, O_RDONLY | O_CLOEXEC);
@@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
newdata->alloc = alloc;
file->data = newdata;
+ file->decided = 1;
}
void

45229
glibc-rh841318.patch Normal file

File diff suppressed because it is too large Load diff

61
glibc-rh911307.patch Normal file
View file

@ -0,0 +1,61 @@
#
# Red Hat BZ:
# https://bugzilla.redhat.com/show_bug.cgi?id=911307
#
# Sourceware BZ: None.
#
# Upstreamm submission: Not yet completed.
#
# ChangeLog
#
# 2013-02-27 Carlos O'Donell <carlos@redhat.com>
#
# * elf/Makefile (CFLAGS-.o): Add -fno-tree-loop-distribute-patterns.
# (CFLAGS-.os): Likewise.
# (CFLAGS-.op): Likewise.
# (CFLAGS-.ob): Likewise.
# (CFLAGS-.oS): Likewise.
# * string/Makefile (CFLAGS-.o): Likewise.
# (CFLAGS-.os): Likewise.
# (CFLAGS-.op): Likewise.
# (CFLAGS-.ob): Likewise.
# (CFLAGS-.oS): Likewise.
#
diff -urN glibc-2.17-c758a686/string/Makefile tmp/glibc-2.17-c758a686/string/Makefile
--- glibc-2.17-c758a686/string/Makefile 2013-02-27 18:07:34.618968703 -0500
+++ tmp/glibc-2.17-c758a686/string/Makefile 2013-02-27 18:08:16.075796160 -0500
@@ -72,6 +72,14 @@ CFLAGS-stratcliff.c = -fno-builtin
CFLAGS-test-ffs.c = -fno-builtin
CFLAGS-tst-inlcall.c = -fno-builtin
+# Disable any optimization which might result in function calls to the very
+# same functions we are trying to compile, thus creating an infinite loop.
+CFLAGS-.o += -fno-tree-loop-distribute-patterns
+CFLAGS-.os += -fno-tree-loop-distribute-patterns
+CFLAGS-.op += -fno-tree-loop-distribute-patterns
+CFLAGS-.ob += -fno-tree-loop-distribute-patterns
+CFLAGS-.oS += -fno-tree-loop-distribute-patterns
+
ifeq ($(run-built-tests),yes)
tests: $(objpfx)tst-svc.out
$(objpfx)tst-svc.out: tst-svc.input $(objpfx)tst-svc
diff -urN glibc-2.17-c758a686/elf/Makefile tmp/glibc-2.17-c758a686/elf/Makefile
--- glibc-2.17-c758a686/elf/Makefile 2013-02-27 18:07:13.812055613 -0500
+++ tmp/glibc-2.17-c758a686/elf/Makefile 2013-02-27 18:08:16.075796160 -0500
@@ -432,6 +432,16 @@
CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
+# Disable any optimization which might result in function calls during early
+# dynamic loader startup. We disable -ftree-loop-distribute-patterns which
+# might convert code into calls to functions like memcpy or memset when the PLT
+# is not yet setup.
+CFLAGS-.o += -fno-tree-loop-distribute-patterns
+CFLAGS-.os += -fno-tree-loop-distribute-patterns
+CFLAGS-.op += -fno-tree-loop-distribute-patterns
+CFLAGS-.ob += -fno-tree-loop-distribute-patterns
+CFLAGS-.oS += -fno-tree-loop-distribute-patterns
+
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
generated += $(addsuffix .so,$(strip $(modules-names)))

181
glibc-rh952799.patch Normal file
View file

@ -0,0 +1,181 @@
#
# Red Hat BZ:
# https://bugzilla.redhat.com/show_bug.cgi?id=816647
#
# ChangeLog
#
#2013-04-30 Patsy Franklin <pfrankli@redhat.com>
#
# * iconv/gconv_cache.c (find_module): Demangle init_fct before
# checking for NULL. Mangle __btowc_fct if init_fct is non-NULL.
# * iconv/gconv_db.c (free_derivation): Check that __shlib_handle
# is non-NULL before demangling the end_fct. Check for NULL
# end_fct after demangling.
# (__gconv_release_step): Demangle the end_fct before checking
# it for NULL. Remove assert on __shlibc_handle != NULL.
# (gen_steps): Don't check btowc_fct for NULL before mangling.
# Demangle init_fct before checking for NULL.
# (increment_counter): Likewise
# * gconv_dl.c (__gconv_find_shlib): Don't check init_fct or
# end_fct for NULL before mangling.
# * wcsmbs/btowc.c (__btowc): Demangle btowc_fct before checking
# for NULL.
#
diff -Nrup a/iconv/gconv_cache.c b/iconv/gconv_cache.c
--- a/iconv/gconv_cache.c 2012-12-24 22:02:13.000000000 -0500
+++ b/iconv/gconv_cache.c 2013-04-30 06:43:24.788684270 -0400
@@ -207,17 +207,16 @@ find_module (const char *directory, cons
result->__data = NULL;
/* Call the init function. */
- if (result->__init_fct != NULL)
- {
- __gconv_init_fct init_fct = result->__init_fct;
+ __gconv_init_fct init_fct = result->__init_fct;
#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (init_fct);
+ PTR_DEMANGLE (init_fct);
#endif
+ if (init_fct != NULL)
+ {
status = DL_CALL_FCT (init_fct, (result));
#ifdef PTR_MANGLE
- if (result->__btowc_fct != NULL)
- PTR_MANGLE (result->__btowc_fct);
+ PTR_MANGLE (result->__btowc_fct);
#endif
}
}
diff -Nrup a/iconv/gconv_db.c b/iconv/gconv_db.c
--- a/iconv/gconv_db.c 2012-12-24 22:02:13.000000000 -0500
+++ b/iconv/gconv_db.c 2013-04-30 06:37:16.886521576 -0400
@@ -179,16 +179,15 @@ free_derivation (void *p)
size_t cnt;
for (cnt = 0; cnt < deriv->nsteps; ++cnt)
- if (deriv->steps[cnt].__counter > 0
- && deriv->steps[cnt].__end_fct != NULL)
+ if ((deriv->steps[cnt].__counter > 0)
+ && (deriv->steps[cnt].__shlib_handle != NULL))
{
- assert (deriv->steps[cnt].__shlib_handle != NULL);
-
__gconv_end_fct end_fct = deriv->steps[cnt].__end_fct;
#ifdef PTR_DEMANGLE
PTR_DEMANGLE (end_fct);
#endif
- DL_CALL_FCT (end_fct, (&deriv->steps[cnt]));
+ if (end_fct != NULL)
+ DL_CALL_FCT (end_fct, (&deriv->steps[cnt]));
}
/* Free the name strings. */
@@ -212,16 +211,12 @@ __gconv_release_step (struct __gconv_ste
if (step->__shlib_handle != NULL && --step->__counter == 0)
{
/* Call the destructor. */
- if (step->__end_fct != NULL)
- {
- assert (step->__shlib_handle != NULL);
-
- __gconv_end_fct end_fct = step->__end_fct;
+ __gconv_end_fct end_fct = step->__end_fct;
#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (end_fct);
+ PTR_DEMANGLE (end_fct);
#endif
- DL_CALL_FCT (end_fct, (step));
- }
+ if (end_fct != NULL)
+ DL_CALL_FCT (end_fct, (step));
#ifndef STATIC_GCONV
/* Release the loaded module. */
@@ -293,13 +288,11 @@ gen_steps (struct derivation_step *best,
/* Call the init function. */
__gconv_init_fct init_fct = result[step_cnt].__init_fct;
- if (init_fct != NULL)
- {
- assert (result[step_cnt].__shlib_handle != NULL);
-
# ifdef PTR_DEMANGLE
- PTR_DEMANGLE (init_fct);
+ PTR_DEMANGLE (init_fct);
# endif
+ if (init_fct != NULL)
+ {
status = DL_CALL_FCT (init_fct, (&result[step_cnt]));
if (__builtin_expect (status, __GCONV_OK) != __GCONV_OK)
@@ -312,8 +305,7 @@ gen_steps (struct derivation_step *best,
}
# ifdef PTR_MANGLE
- if (result[step_cnt].__btowc_fct != NULL)
- PTR_MANGLE (result[step_cnt].__btowc_fct);
+ PTR_MANGLE (result[step_cnt].__btowc_fct);
# endif
}
}
@@ -393,16 +385,15 @@ increment_counter (struct __gconv_step *
/* Call the init function. */
__gconv_init_fct init_fct = step->__init_fct;
- if (init_fct != NULL)
- {
#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (init_fct);
+ PTR_DEMANGLE (init_fct);
#endif
+ if (init_fct != NULL)
+ {
DL_CALL_FCT (init_fct, (step));
#ifdef PTR_MANGLE
- if (step->__btowc_fct != NULL)
- PTR_MANGLE (step->__btowc_fct);
+ PTR_MANGLE (step->__btowc_fct);
#endif
}
}
diff -Nrup a/iconv/gconv_dl.c b/iconv/gconv_dl.c
--- a/iconv/gconv_dl.c 2012-12-24 22:02:13.000000000 -0500
+++ b/iconv/gconv_dl.c 2013-04-30 06:37:16.889521601 -0400
@@ -132,10 +132,8 @@ __gconv_find_shlib (const char *name)
#ifdef PTR_MANGLE
PTR_MANGLE (found->fct);
- if (found->init_fct != NULL)
- PTR_MANGLE (found->init_fct);
- if (found->end_fct != NULL)
- PTR_MANGLE (found->end_fct);
+ PTR_MANGLE (found->init_fct);
+ PTR_MANGLE (found->end_fct);
#endif
/* We have succeeded in loading the shared object. */
diff -Nrup a/wcsmbs/btowc.c b/wcsmbs/btowc.c
--- a/wcsmbs/btowc.c 2012-12-24 22:02:13.000000000 -0500
+++ b/wcsmbs/btowc.c 2013-04-30 06:37:16.891521619 -0400
@@ -47,15 +47,15 @@ __btowc (c)
/* Get the conversion functions. */
fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
__gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct;
+#ifdef PTR_DEMANGLE
+ if (fcts->towc->__shlib_handle != NULL)
+ PTR_DEMANGLE (btowc_fct);
+#endif
if (__builtin_expect (fcts->towc_nsteps == 1, 1)
&& __builtin_expect (btowc_fct != NULL, 1))
{
/* Use the shortcut function. */
-#ifdef PTR_DEMANGLE
- if (fcts->towc->__shlib_handle != NULL)
- PTR_DEMANGLE (btowc_fct);
-#endif
return DL_CALL_FCT (btowc_fct, (fcts->towc, (unsigned char) c));
}
else

View file

@ -1,567 +0,0 @@
diff -Nrup a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh
--- a/scripts/check-local-headers.sh 2012-01-01 05:16:32.000000000 -0700
+++ b/scripts/check-local-headers.sh 2012-01-01 20:41:26.683439836 -0700
@@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)"
+ "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{
diff -Nrup a/sysdeps/i386/__longjmp.S b/sysdeps/i386/__longjmp.S
--- a/sysdeps/i386/__longjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/i386/__longjmp.S 2012-01-01 20:41:26.686439835 -0700
@@ -1,5 +1,5 @@
/* longjmp for i386.
- Copyright (C) 1995-1998,2000,2002,2005,2006,2009
+ Copyright (C) 1995-1998,2000,2002,2005,2006,2009,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -21,6 +21,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
.text
ENTRY (__longjmp)
@@ -33,6 +34,7 @@ ENTRY (__longjmp)
movl (JB_SP*4)(%eax), %ecx
PTR_DEMANGLE (%edx)
PTR_DEMANGLE (%ecx)
+ LIBC_PROBE (longjmp, 3, 4@%eax, -4@8(%esp), 4@%edx)
cfi_def_cfa(%eax, 0)
cfi_register(%eip, %edx)
cfi_register(%esp, %ecx)
@@ -50,6 +52,7 @@ ENTRY (__longjmp)
cfi_restore(%edi)
cfi_restore(%ebp)
+ LIBC_PROBE (longjmp_target, 3, 4@%eax, -4@8(%esp), 4@%edx)
movl 8(%esp), %eax /* Second argument is return value. */
movl %ecx, %esp
#else
@@ -57,12 +60,14 @@ ENTRY (__longjmp)
movl 8(%esp), %eax /* Second argument is return value. */
/* Save the return address now. */
movl (JB_PC*4)(%ecx), %edx
+ LIBC_PROBE (longjmp, 3, 4@%ecx, -4@%eax, 4@%edx)
/* Restore registers. */
movl (JB_BX*4)(%ecx), %ebx
movl (JB_SI*4)(%ecx), %esi
movl (JB_DI*4)(%ecx), %edi
movl (JB_BP*4)(%ecx), %ebp
movl (JB_SP*4)(%ecx), %esp
+ LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%ecx, 4@%edx)
#endif
/* Jump to saved PC. */
jmp *%edx
diff -Nrup a/sysdeps/i386/bsd-_setjmp.S b/sysdeps/i386/bsd-_setjmp.S
--- a/sysdeps/i386/bsd-_setjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/i386/bsd-_setjmp.S 2012-01-01 20:41:26.686439835 -0700
@@ -1,5 +1,6 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. i386 version.
- Copyright (C) 1994-1997,2000-2002,2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997,2000-2002,2005,2006,2011
+ 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
@@ -25,6 +26,7 @@
#include <jmpbuf-offsets.h>
#include "bp-sym.h"
#include "bp-asm.h"
+#include <stap-probe.h>
#define PARMS LINKAGE /* no space for saved regs */
#define JMPBUF PARMS
@@ -47,6 +49,7 @@ ENTRY (BP_SYM (_setjmp))
#endif
movl %ecx, (JB_SP*4)(%edx)
movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
+ LIBC_PROBE (setjmp, 3, 4@%edx, -4@$0, 4@%ecx)
#ifdef PTR_MANGLE
PTR_MANGLE (%ecx)
#endif
diff -Nrup a/sysdeps/i386/bsd-setjmp.S b/sysdeps/i386/bsd-setjmp.S
--- a/sysdeps/i386/bsd-setjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/i386/bsd-setjmp.S 2012-01-01 20:41:26.687439834 -0700
@@ -1,5 +1,6 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. i386 version.
- Copyright (C) 1994-1997,2000,2001,2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997,2000,2001,2005,2006,2011
+ 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
@@ -25,6 +26,7 @@
#include <jmpbuf-offsets.h>
#include "bp-sym.h"
#include "bp-asm.h"
+#include <stap-probe.h>
#define PARMS LINKAGE /* no space for saved regs */
#define JMPBUF PARMS
@@ -49,6 +51,7 @@ ENTRY (BP_SYM (setjmp))
#endif
movl %ecx, (JB_SP*4)(%eax)
movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
+ LIBC_PROBE (setjmp, 3, 4@%eax, -4@$1, 4@%ecx)
#ifdef PTR_MANGLE
PTR_MANGLE (%ecx)
#endif
diff -Nrup a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S
--- a/sysdeps/i386/setjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/i386/setjmp.S 2012-01-01 20:41:26.687439834 -0700
@@ -1,5 +1,5 @@
/* setjmp for i386.
- Copyright (C) 1995,1996,1997,2000,2001,2005,2006
+ Copyright (C) 1995,1996,1997,2000,2001,2005,2006,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -23,6 +23,7 @@
#include <asm-syntax.h>
#include "bp-sym.h"
#include "bp-asm.h"
+#include <stap-probe.h>
#define PARMS LINKAGE /* no space for saved regs */
#define JMPBUF PARMS
@@ -44,6 +45,7 @@ ENTRY (BP_SYM (__sigsetjmp))
#endif
movl %ecx, (JB_SP*4)(%eax)
movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
+ LIBC_PROBE (setjmp, 3, 4@%eax, -4@SIGMSK(%esp), 4@%ecx)
#ifdef PTR_MANGLE
PTR_MANGLE (%ecx)
#endif
diff -Nrup a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
--- a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2012-01-01 20:41:26.699439832 -0700
@@ -1,4 +1,5 @@
-/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2004,2005,2006,2009,2011
+ 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
@@ -19,6 +20,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
.section .rodata.str1.1,"aMS",@progbits,1
@@ -79,7 +81,9 @@ ENTRY (____longjmp_chk)
cfi_adjust_cfa_offset(-12)
movl 4(%esp), %ecx
-.Lok: /* We add unwind information for the target here. */
+.Lok:
+ LIBC_PROBE (longjmp, 3, 4@%ecx, -4@8(%esp), 4@%edx)
+ /* We add unwind information for the target here. */
cfi_def_cfa(%ecx, 0)
cfi_register(%eip, %edx)
cfi_register(%esp, %edi)
@@ -102,5 +106,6 @@ ENTRY (____longjmp_chk)
cfi_restore(%ebp)
/* Jump to saved PC. */
+ LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%eax, 4@%edx)
jmp *%edx
END (____longjmp_chk)
diff -Nrup a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
--- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2012-01-01 20:41:26.703439831 -0700
@@ -19,6 +19,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
.section .rodata.str1.1,"aMS",@progbits,1
.type longjmp_msg,@object
@@ -94,7 +95,9 @@ ENTRY(____longjmp_chk)
movl %ebx, %esi
cfi_restore (%rsi)
-.Lok: /* We add unwind information for the target here. */
+.Lok:
+ LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
+ /* We add unwind information for the target here. */
cfi_def_cfa(%rdi, 0)
cfi_register(%rsp,%r8)
cfi_register(%rbp,%r9)
@@ -113,5 +116,6 @@ ENTRY(____longjmp_chk)
movl %esi, %eax
movq %r8,%rsp
movq %r9,%rbp
+ LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
jmpq *%rdx
END (____longjmp_chk)
diff -Nrup a/sysdeps/x86_64/__longjmp.S b/sysdeps/x86_64/__longjmp.S
--- a/sysdeps/x86_64/__longjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/x86_64/__longjmp.S 2012-01-01 20:41:26.703439831 -0700
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2004,2005,2006,2009,2011 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
@@ -19,6 +19,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0.
@@ -34,6 +35,7 @@ ENTRY(__longjmp)
PTR_DEMANGLE (%r9)
PTR_DEMANGLE (%rdx)
#endif
+ LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
/* We add unwind information for the target here. */
cfi_def_cfa(%rdi, 0)
cfi_register(%rsp,%r8)
@@ -53,5 +55,6 @@ ENTRY(__longjmp)
mov %esi, %eax
movq %r8,%rsp
movq %r9,%rbp
+ LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
jmpq *%rdx
END (__longjmp)
diff -Nrup a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S
--- a/sysdeps/x86_64/setjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/x86_64/setjmp.S 2012-01-01 20:41:26.704439831 -0700
@@ -1,5 +1,5 @@
/* setjmp for x86-64.
- Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001,2003,2005,2006,2011 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
@@ -20,6 +20,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
ENTRY (__sigsetjmp)
/* Save registers. */
@@ -41,6 +42,7 @@ ENTRY (__sigsetjmp)
#endif
movq %rdx, (JB_RSP*8)(%rdi)
movq (%rsp), %rax /* Save PC we are returning to now. */
+ LIBC_PROBE (setjmp, 3, 8@%rdi, -4@%esi, 8@%rax)
#ifdef PTR_MANGLE
PTR_MANGLE (%rax)
#endif
diff -Nrup a/include/stap-probe.h b/include/stap-probe.h
--- a/include/stap-probe.h 1969-12-31 17:00:00.000000000 -0700
+++ b/include/stap-probe.h 2012-01-01 20:41:26.646439841 -0700
@@ -0,0 +1,140 @@
+/* Macros for defining Systemtap <sys/sdt.h> static probe points.
+ Copyright (C) 2011 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _STAP_PROBE_H
+#define _STAP_PROBE_H 1
+
+#ifdef USE_STAP_PROBE
+
+# include <sys/sdt.h>
+
+/* Our code uses one macro LIBC_PROBE (name, n, arg1, ..., argn).
+
+ Without USE_STAP_PROBE, that does nothing but evaluates all
+ its arguments (to prevent bit rot, unlike e.g. assert).
+
+ Systemtap's header defines the macros STAP_PROBE (provider, name) and
+ STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
+ in the IN_LIB name (libc, libpthread, etc.) automagically. */
+
+# ifndef NOT_IN_libc
+# define IN_LIB libc
+# elif !defined IN_LIB
+/* This is intentionally defined with extra unquoted commas in it so
+ that macro substitution will bomb out when it is used. We don't
+ just use #error here, so that this header can be included by
+ other headers that use LIBC_PROBE inside their own macros. We
+ only want such headers to fail to compile if those macros are
+ actually used in a context where IN_LIB has not been defined. */
+# define IN_LIB ,,,missing -DIN_LIB=... -- not extra-lib.mk?,,,
+# endif
+
+# define LIBC_PROBE(name, n, ...) \
+ LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
+
+# define LIBC_PROBE_1(lib, name, n, ...) \
+ STAP_PROBE##n (lib, name, ## __VA_ARGS__)
+
+# define STAP_PROBE0 STAP_PROBE
+
+# define LIBC_PROBE_ASM(name, template) \
+ STAP_PROBE_ASM (IN_LIB, name, template)
+
+# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
+
+#else /* Not USE_STAP_PROBE. */
+
+# ifndef __ASSEMBLER__
+# define LIBC_PROBE(name, n, ...) DUMMY_PROBE##n (__VA_ARGS__)
+# else
+# define LIBC_PROBE(name, n, ...) /* Nothing. */
+# endif
+
+# define LIBC_PROBE_ASM(name, template) /* Nothing. */
+# define LIBC_PROBE_ASM_OPERANDS(n, ...) /* Nothing. */
+
+/* This silliness lets us evaluate all the arguments for each arity
+ of probe. My kingdom for a real macro system. */
+
+# define DUMMY_PROBE0() do {} while (0)
+# define DUMMY_PROBE1(a1) do {} while ((void) (a1), 0)
+# define DUMMY_PROBE2(a1, a2) do {} while ((void) (a1), \
+ (void) (a2), 0)
+# define DUMMY_PROBE3(a1, a2, a3) do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), 0)
+# define DUMMY_PROBE4(a1, a2, a3, a4) do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), 0)
+# define DUMMY_PROBE5(a1, a2, a3, a4, a5) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), 0)
+# define DUMMY_PROBE6(a1, a2, a3, a4, a5, a6) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), 0)
+# define DUMMY_PROBE7(a1, a2, a3, a4, a5, a6, a7) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), 0)
+# define DUMMY_PROBE8(a1, a2, a3, a4, a5, a6, a7, a8) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), \
+ (void) (a8), 0)
+# define DUMMY_PROBE9(a1, a2, a3, a4, a5, a6, a7, a8, a9) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), \
+ (void) (a8), \
+ (void) (a9), 0)
+# define DUMMY_PROBE10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), \
+ (void) (a8), \
+ (void) (a9), \
+ (void) (a10), 0)
+
+#endif /* USE_STAP_PROBE. */
+
+#endif /* stap-probe.h */
diff -Nrup a/config.h.in b/config.h.in
--- a/config.h.in 2012-01-01 05:16:32.000000000 -0700
+++ b/config.h.in 2012-01-01 20:41:26.632439843 -0700
@@ -187,6 +187,9 @@
/* Define if `.ctors' and `.dtors' sections shouldn't be used. */
#undef NO_CTORS_DTORS_SECTIONS
+/* Define if Systemtap <sys/sdt.h> probes should be defined. */
+#undef USE_STAP_PROBE
+
/*
*/
diff -Nrup a/configure b/configure
--- a/configure 2012-01-01 20:40:50.423446105 -0700
+++ b/configure 2012-01-01 20:41:26.634439843 -0700
@@ -791,6 +791,7 @@ enable_kernel
enable_all_warnings
enable_multi_arch
enable_nss_crypt
+enable_systemtap
with_cpu
'
ac_precious_vars='build_alias
@@ -1450,6 +1451,7 @@ Optional Features:
--enable-multi-arch enable single DSO with optimizations for multiple
architectures
--enable-nss-crypt enable libcrypt to use nss
+ --enable-systemtap enable systemtap static probe points [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -3804,6 +3806,51 @@ else
fi
+# Check whether --enable-systemtap was given.
+if test "${enable_systemtap+set}" = set; then :
+ enableval=$enable_systemtap; systemtap=$enableval
+else
+ systemtap=no
+fi
+
+if test x$systemtap != xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemtap static probe support" >&5
+$as_echo_n "checking for systemtap static probe support... " >&6; }
+if test "${libc_cv_sdt+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="-std=gnu99 $CFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/sdt.h>
+void foo (int i, void *p)
+{
+ asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
+ :: STAP_PROBE_ASM_OPERANDS (2, i, p));
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_cv_sdt=yes
+else
+ libc_cv_sdt=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$old_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sdt" >&5
+$as_echo "$libc_cv_sdt" >&6; }
+ if test $libc_cv_sdt = yes; then
+ $as_echo "#define USE_STAP_PROBE 1" >>confdefs.h
+
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "systemtap support needs sys/sdt.h with asm support
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+fi
+
# The way shlib-versions is used to generate soversions.mk uses a
# fairly simplistic model for name recognition that can't distinguish
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
diff -Nrup a/configure.in b/configure.in
--- a/configure.in 2012-01-01 05:16:32.000000000 -0700
+++ b/configure.in 2012-01-01 20:41:26.635439843 -0700
@@ -290,6 +290,29 @@ else
fi
AC_SUBST(libc_cv_nss_crypt)
+AC_ARG_ENABLE([systemtap],
+ [AS_HELP_STRING([--enable-systemtap],
+ [enable systemtap static probe points @<:@default=no@:>@])],
+ [systemtap=$enableval],
+ [systemtap=no])
+if test x$systemtap != xno; then
+ AC_CACHE_CHECK([for systemtap static probe support], libc_cv_sdt, [dnl
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="-std=gnu99 $CFLAGS"
+ AC_COMPILE_IFELSE([#include <sys/sdt.h>
+void foo (int i, void *p)
+{
+ asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
+ :: STAP_PROBE_ASM_OPERANDS (2, i, p));
+}], [libc_cv_sdt=yes], [libc_cv_sdt=no])
+ CFLAGS="$old_CFLAGS"])
+ if test $libc_cv_sdt = yes; then
+ AC_DEFINE([USE_STAP_PROBE])
+ else
+ AC_MSG_FAILURE([systemtap support needs sys/sdt.h with asm support])
+ fi
+fi
+
# The way shlib-versions is used to generate soversions.mk uses a
# fairly simplistic model for name recognition that can't distinguish
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
diff -Nrup a/extra-lib.mk b/extra-lib.mk
--- a/extra-lib.mk 2012-01-01 05:16:32.000000000 -0700
+++ b/extra-lib.mk 2012-01-01 20:41:26.644439841 -0700
@@ -101,4 +101,4 @@ ifneq (,$(cpp-srcs-left))
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
endif
-CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1
+CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1 -DIN_LIB=$(lib)
diff -Nrup a/elf/Makefile b/elf/Makefile
--- a/elf/Makefile 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/Makefile 2012-01-01 20:41:26.637439843 -0700
@@ -505,7 +506,8 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'
CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
CFLAGS-cache.c = $(SYSCONF-FLAGS)
-CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
+CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
+ -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
generated += $(addsuffix .so,$(strip $(modules-names)))
diff -Nrup a/elf/rtld-Rules b/elf/rtld-Rules
--- a/elf/rtld-Rules 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/rtld-Rules 2012-01-01 20:41:26.642439841 -0700
@@ -1,7 +1,7 @@
# Subroutine makefile for compiling libc modules linked into dynamic linker.
# Copyright (C) 2002,2003,2005,2006,2008,2010,2011
-# Free Software Foundation, Inc.
+# 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
@@ -131,6 +131,6 @@ ifdef rtld-depfiles
endif
# This here is the whole point of all the shenanigans.
-rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1
+rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld
endif

View file

@ -1,28 +0,0 @@
diff -Nrup a/elf/dl-open.c b/elf/dl-open.c
--- a/elf/dl-open.c 2012-01-29 21:57:36.251660367 -0700
+++ b/elf/dl-open.c 2012-01-29 21:58:55.762694069 -0700
@@ -328,7 +328,7 @@ dl_open_worker (void *a)
while (l != NULL);
if (nmaps > 1)
{
- char seen[nmaps];
+ uint16_t seen[nmaps];
memset (seen, '\0', nmaps);
size_t i = 0;
while (1)
@@ -354,13 +354,13 @@ dl_open_worker (void *a)
(k - i) * sizeof (maps[0]));
maps[k] = thisp;
- if (seen[i + 1] > 1)
+ if (seen[i + 1] > nmaps - i)
{
++i;
goto next_clear;
}
- char this_seen = seen[i];
+ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1],
(k - i) * sizeof (seen[0]));
seen[k] = this_seen;

Some files were not shown because too many files have changed in this diff Show more