diff --git a/.abf.yml b/.abf.yml index fe1a2c0..f21b13b 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,7 +1,7 @@ --- sources: crypt_blowfish-1.2.tar.gz: 306ff83af206fac786900ce5e4800516cae909d9 - glibc-2.16.0-fedora.tar.xz: 176ddb5fd0ecd2315de5d04ff06b37f540794626 - glibc-2.16.0.tar.xz: 9d4fffc9c4ac93e7919e124fa38bb51dcaff5216 + glibc-2.15-a316c1f-fedora.tar.gz: fc08eb2483a8401fd324ffd36290d54a5b55bde3 + glibc-2.15-a316c1f.tar.gz: aa07170ac6e14a2b3eecd45af19825fa36844dd6 glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f - glibc-ports-2.16.0.tar.xz: 429b979b697a97befb56cce49b96ee47d708f20a + glibc-ports-2.15-ad8ae7d.tar.gz: 8626c7eb72f0cad6acf0b94d72b124b8d2dac825 diff --git a/crypt_freesec.c b/crypt_freesec.c index b23cccc..a2d38d2 100644 --- a/crypt_freesec.c +++ b/crypt_freesec.c @@ -2,8 +2,9 @@ * This version is derived from the original implementation of FreeSec * (release 1.1) by David Burren. I've reviewed the changes made in * OpenBSD (as of 2.7) and modified the original code in a similar way - * where applicable. I've also made it reentrant and did a number of - * other changes -- SD. + * where applicable. I've also made it reentrant and made a number of + * other changes. + * - Solar Designer */ /* @@ -36,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Owl: Owl/packages/glibc/crypt_freesec.c,v 1.4 2005/11/16 13:08:32 solar Exp $ + * $Owl: Owl/packages/glibc/crypt_freesec.c,v 1.6 2010/02/20 14:45:06 solar Exp $ * $Id: crypt.c,v 1.15 1994/09/13 04:58:49 davidb Exp $ * * This is an original implementation of the DES and the crypt(3) interfaces @@ -54,9 +55,8 @@ * posted to the sci.crypt newsgroup by the author and is available for FTP. * * ARCHITECTURE ASSUMPTIONS: - * This code used to have some nasty ones, but I believe these have - * been removed by now. The code isn't very portable and requires a - * 32-bit integer type, though -- SD. + * This code used to have some nasty ones, but these have been removed + * by now. The code requires a 32-bit integer type, though. */ #include @@ -181,22 +181,35 @@ static u_int32_t fp_maskl[8][256], fp_maskr[8][256]; static u_int32_t key_perm_maskl[8][128], key_perm_maskr[8][128]; static u_int32_t comp_maskl[8][128], comp_maskr[8][128]; +/* + * We match the behavior of UFC-crypt on systems where "char" is signed by + * default (the majority), regardless of char's signedness on our system. + */ static inline int ascii_to_bin(char ch) { - if (ch > 'z') - return(0); - if (ch >= 'a') - return(ch - 'a' + 38); - if (ch > 'Z') - return(0); - if (ch >= 'A') - return(ch - 'A' + 12); - if (ch > '9') - return(0); - if (ch >= '.') - return(ch - '.'); - return(0); + signed char sch = ch; + int retval; + + retval = sch - '.'; + if (sch >= 'A') { + retval = sch - ('A' - 12); + if (sch >= 'a') + retval = sch - ('a' - 38); + } + retval &= 0x3f; + + return(retval); +} + +/* + * When we choose to "support" invalid salts, nevertheless disallow those + * containing characters that would violate the passwd file format. + */ +static inline int +ascii_is_unsafe(char ch) +{ + return !ch || ch == '\n' || ch == ':'; } void @@ -626,14 +639,24 @@ _crypt_extended_r(const char *key, const char *setting, if (*setting == _PASSWORD_EFMT1) { /* * "new"-style: - * setting - underscore, 4 bytes of count, 4 bytes of salt + * setting - underscore, 4 chars of count, 4 chars of salt * key - unlimited characters */ - for (i = 1, count = 0; i < 5; i++) - count |= ascii_to_bin(setting[i]) << (i - 1) * 6; + for (i = 1, count = 0; i < 5; i++) { + int value = ascii_to_bin(setting[i]); + if (ascii64[value] != setting[i]) + return(NULL); + count |= value << (i - 1) * 6; + } + if (!count) + return(NULL); - for (i = 5, salt = 0; i < 9; i++) - salt |= ascii_to_bin(setting[i]) << (i - 5) * 6; + for (i = 5, salt = 0; i < 9; i++) { + int value = ascii_to_bin(setting[i]); + if (ascii64[value] != setting[i]) + return(NULL); + salt |= value << (i - 5) * 6; + } while (*key) { /* @@ -652,35 +675,25 @@ _crypt_extended_r(const char *key, const char *setting, if (des_setkey((u_char *) keybuf, data)) return(NULL); } - strncpy(data->output, setting, 9); - /* - * Double check that we weren't given a short setting. - * If we were, the above code will probably have created - * wierd values for count and salt, but we don't really care. - * Just make sure the output string doesn't have an extra - * NUL in it. - */ + memcpy(data->output, setting, 9); data->output[9] = '\0'; - p = (u_char *) data->output + strlen(data->output); + p = (u_char *) data->output + 9; } else { /* * "old"-style: - * setting - 2 bytes of salt + * setting - 2 chars of salt * key - up to 8 characters */ count = 25; + if (ascii_is_unsafe(setting[0]) || ascii_is_unsafe(setting[1])) + return(NULL); + salt = (ascii_to_bin(setting[1]) << 6) | ascii_to_bin(setting[0]); data->output[0] = setting[0]; - /* - * If the encrypted password that the salt was extracted from - * is only 1 character long, the salt will be corrupted. We - * need to ensure that the output string doesn't have an extra - * NUL in it! - */ - data->output[1] = setting[1] ? setting[1] : data->output[0]; + data->output[1] = setting[1]; p = (u_char *) data->output + 2; } setup_salt(salt, data); @@ -734,6 +747,7 @@ static struct { char *hash; char *pw; } tests[] = { +/* "new"-style */ {"_J9..CCCCXBrJUJV154M", "U*U*U*U*"}, {"_J9..CCCCXUhOBTXzaiE", "U*U***U"}, {"_J9..CCCC4gQ.mB/PffM", "U*U***U*"}, @@ -746,6 +760,30 @@ static struct { {"_J9..SDizxmRI1GjnQuE", "zxyDPWgydbQjgq"}, {"_K9..SaltNrQgIYUAeoY", "726 even"}, {"_J9..SDSD5YGyRCr4W4c", ""}, +/* "old"-style, valid salts */ + {"CCNf8Sbh3HDfQ", "U*U*U*U*"}, + {"CCX.K.MFy4Ois", "U*U***U"}, + {"CC4rMpbg9AMZ.", "U*U***U*"}, + {"XXxzOu6maQKqQ", "*U*U*U*U"}, + {"SDbsugeBiC58A", ""}, + {"./xZjzHv5vzVE", "password"}, + {"0A2hXM1rXbYgo", "password"}, + {"A9RXdR23Y.cY6", "password"}, + {"ZziFATVXHo2.6", "password"}, + {"zZDDIZ0NOlPzw", "password"}, +/* "old"-style, "reasonable" invalid salts, UFC-crypt behavior expected */ + {"\001\002wyd0KZo65Jo", "password"}, + {"a_C10Dk/ExaG.", "password"}, + {"~\377.5OTsRVjwLo", "password"}, +/* The below are erroneous inputs, so NULL return is expected/required */ + {"", ""}, /* no salt */ + {" ", ""}, /* setting string is too short */ + {"a:", ""}, /* unsafe character */ + {"\na", ""}, /* unsafe character */ + {"_/......", ""}, /* setting string is too short for its type */ + {"_........", ""}, /* zero iteration count */ + {"_/!......", ""}, /* invalid character in count */ + {"_/......!", ""}, /* invalid character in salt */ {NULL} }; @@ -753,8 +791,12 @@ int main(void) { int i; - for (i = 0; tests[i].hash; i++) - if (strcmp(crypt(tests[i].pw, tests[i].hash), tests[i].hash)) { + for (i = 0; tests[i].hash; i++) { + char *hash = crypt(tests[i].pw, tests[i].hash); + if (!hash && strlen(tests[i].hash) < 13) + continue; /* expected failure */ + if (!strcmp(hash, tests[i].hash)) + continue; /* expected success */ puts("FAILED"); return 1; } diff --git a/crypt_freesec.h b/crypt_freesec.h index bbf7be8..e1bc446 100644 --- a/crypt_freesec.h +++ b/crypt_freesec.h @@ -1,3 +1,12 @@ +/* + * The following notice applies to this header file (only): + * + * Copyright (c) 2002,2010 Solar Designer + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + */ + #ifndef _CRYPT_FREESEC_H #define _CRYPT_FREESEC_H @@ -13,7 +22,29 @@ struct _crypt_extended_data { /* * _crypt_extended_init() must be called explicitly before first use of - * _crypt_extended_r(). + * _crypt_extended_r(). Strictly speaking, _crypt_extended_init() is not + * reentrant. All it does is initialize some global variables to constant + * values, so it is unlikely that anything would go wrong if this is done + * multiple times in parallel, but correct behavior in that case is not + * guaranteed (e.g., things may go wrong if a given CPU architecture can't + * operate on 32-bit quantities natively, requiring read-modify-write + * instruction sequences operating on larger quantities and thus affecting + * nearby array elements). + * + * Before first use of the data structure, its "initialized" field must be + * set to 0. This is compatible with the requirement of some other crypt_r() + * implementations requiring the entire data structure to be initialized + * with all zero bytes, so that approach may be applied instead (e.g., this + * may be required from the callers of a wrapper function). + * + * _crypt_extended_r() returns NULL on error. Although modern standards say + * that crypt(3) does in fact return NULL on error, many applications do not + * expect that. Thus, it is recommended that a crypt(3)-like wrapper function + * translate these NULL returns into strings guaranteed to be different from + * the "setting" string, too short for matching a valid password hash, and not + * containing any characters that would be special for the passwd file format. + * Specifically, such a wrapper function may return "*0" on error as long as + * the "setting" string does not start with "*0", or "*1" otherwise. */ void _crypt_extended_init(void); diff --git a/glibc-2.16.0-string-format-fixes.patch b/glibc-2.14-394-g8f3b1ff-string-format-fixes.patch similarity index 88% rename from glibc-2.16.0-string-format-fixes.patch rename to glibc-2.14-394-g8f3b1ff-string-format-fixes.patch index 71acf1e..43b29e0 100644 --- a/glibc-2.16.0-string-format-fixes.patch +++ b/glibc-2.14-394-g8f3b1ff-string-format-fixes.patch @@ -75,3 +75,14 @@ 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 diff --git a/glibc-2.15-chromium-browser-crash.patch b/glibc-2.15-chromium-browser-crash.patch new file mode 100644 index 0000000..17556ec --- /dev/null +++ b/glibc-2.15-chromium-browser-crash.patch @@ -0,0 +1,12 @@ +--- 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; diff --git a/glibc-2.16.0-avx-relocate_fcrypt.patch b/glibc-2.16.0-avx-relocate_fcrypt.patch deleted file mode 100644 index f9aeeae..0000000 --- a/glibc-2.16.0-avx-relocate_fcrypt.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- glibc-2.16.0/crypt/wrapper.c.orig 2012-07-03 18:32:29.000000000 +0400 -+++ glibc-2.16.0/crypt/wrapper.c 2012-07-03 18:42:56.935595814 +0400 -@@ -326,6 +326,21 @@ - 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 - static const char *tests[][3] = { diff --git a/glibc-2.16.0-i586-hptiming.patch b/glibc-2.16.0-i586-hptiming.patch deleted file mode 100644 index d17249b..0000000 --- a/glibc-2.16.0-i586-hptiming.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- glibc-2.16.0/elf/rtld.c.orig 2012-07-03 14:45:24.564837876 +0400 -+++ glibc-2.16.0/elf/rtld.c 2012-07-03 14:50:58.156918323 +0400 -@@ -16,6 +16,9 @@ - License along with the GNU C Library; if not, see - . */ - -+/* Early statistics require high-precision timing. */ -+#define NEED_HP_TIMING_HWCAP_AVAIL 1 -+ - #include - #include - #include -@@ -190,6 +193,12 @@ - static struct libname_list _dl_rtld_libname; - static struct libname_list _dl_rtld_libname2; - -+/* Run-time detect availability of high-precision timer? */ -+#ifdef HP_TIMING_HWCAP_AVAIL -+# undef HP_TIMING_AVAIL -+# define HP_TIMING_AVAIL HP_TIMING_HWCAP_AVAIL -+#endif -+ - /* We expect less than a second for relocation. */ - #ifdef HP_SMALL_TIMING_AVAIL - # undef HP_TIMING_AVAIL -@@ -321,9 +330,8 @@ - - #endif - --#if HP_TIMING_AVAIL -- HP_TIMING_NOW (GL(dl_cpuclock_offset)); --#endif -+ if (HP_TIMING_AVAIL) -+ HP_TIMING_NOW (GL(dl_cpuclock_offset)); - - /* Initialize the stack end variable. */ - __libc_stack_end = __builtin_frame_address (0); diff --git a/glibc-2.16.0-multiarch.patch b/glibc-2.16.0-multiarch.patch deleted file mode 100644 index 1c62f15..0000000 --- a/glibc-2.16.0-multiarch.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- glibc-2.16.0/scripts/check-local-headers.sh.orig 2012-07-03 13:31:41.000000000 +0400 -+++ glibc-2.16.0/scripts/check-local-headers.sh 2012-07-03 13:58:54.527563305 +0400 -@@ -28,7 +28,7 @@ - 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 } - { diff --git a/glibc-2.16.0-rh740682.patch b/glibc-2.16.0-rh740682.patch deleted file mode 100644 index 0800a1e..0000000 --- a/glibc-2.16.0-rh740682.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- glibc-2.16.0/time/sys/time.h.orig 2012-06-30 23:12:34.000000000 +0400 -+++ glibc-2.16.0/time/sys/time.h 2012-07-03 15:55:56.473832226 +0400 -@@ -77,7 +77,7 @@ - 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 diff --git a/glibc-2.16.0-share-locale.patch b/glibc-2.16.0-share-locale.patch deleted file mode 100644 index 0d850a9..0000000 --- a/glibc-2.16.0-share-locale.patch +++ /dev/null @@ -1,12 +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 --git a/glibc-2.16.0-testsuite-rt-notparallel.patch b/glibc-2.16.0-testsuite-rt-notparallel.patch deleted file mode 100644 index fd57431..0000000 --- a/glibc-2.16.0-testsuite-rt-notparallel.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- glibc-2.16.0/rt/Makefile.orig 2012-06-30 23:12:34.000000000 +0400 -+++ glibc-2.16.0/rt/Makefile 2012-07-03 15:09:01.696678685 +0400 -@@ -78,3 +78,13 @@ - 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 diff --git a/glibc-2.16.0.tar.xz.sig b/glibc-2.16.0.tar.xz.sig deleted file mode 100644 index 2d05f3f..0000000 --- a/glibc-2.16.0.tar.xz.sig +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.11 (GNU/Linux) - -iQEcBAABAgAGBQJP71ojAAoJECXvCkNsKkr/hW8IANUeX+DLwWU5lJuPTTsl6C3M -GHa3S8h7zV8uIaJPonmX4DumiacQZQLX65A2utoi90s2Y4xBrQQwmlqBzNmJGr0q -HALR14V1kp9b5xF+ovtUE41hUTaCwUBXYUp0ODXwFCJqdYJJFWJ1mUI7rWcE3AHM -MGMVyIKm5gtvRNdxSmR96S2V+5hudavChRGCgwdVy301QvqV8qnizf1WCTmxV3vC -mxjVfqZRnh0721eArz19YtnX7eU86SGWP3QaeIo+7xfpoyqwhh5Y+5yfh6MqZNZk -yCDD9jUfjhcejBTSSMaUKc3ZNssaHKm4FfQeQqCayiGGLzpbdB/WKkPV7wHlebM= -=l5tZ ------END PGP SIGNATURE----- diff --git a/glibc-2.2-nss-upgrade.patch b/glibc-2.2-nss-upgrade.patch deleted file mode 100644 index a3630b7..0000000 --- a/glibc-2.2-nss-upgrade.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- glibc-2.2/nss/nsswitch.c.chmou Fri Mar 31 22:38:32 2000 -+++ glibc-2.2/nss/nsswitch.c Wed Nov 22 00:35:53 2000 -@@ -333,9 +333,20 @@ - ni->library->lib_handle = __libc_dlopen (shlib_name); - if (ni->library->lib_handle == NULL) - { -- /* Failed to load the library. */ -- ni->library->lib_handle = (void *) -1l; -- __set_errno (saved_errno); -+ /* Failed to load the library. Try a fallback. */ -+ int n = __snprintf(shlib_name, shlen, "libnss_%s.so.%d.%d", -+ ni->library->name, __GLIBC__, __GLIBC_MINOR__); -+ if (n >= shlen) -+ ni->library->lib_handle = NULL; -+ else -+ ni->library->lib_handle = __libc_dlopen (shlib_name); -+ -+ if (ni->library->lib_handle == NULL) -+ { -+ /* Ok, really fail now. */ -+ ni->library->lib_handle = (void *) -1l; -+ __set_errno (saved_errno); -+ } - } - } - diff --git a/glibc-2.3.2-tcsetattr-kernel-bug-workaround.patch b/glibc-2.3.2-tcsetattr-kernel-bug-workaround.patch deleted file mode 100644 index 2d71f88..0000000 --- a/glibc-2.3.2-tcsetattr-kernel-bug-workaround.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c.tcsetattr-kernel-bug-workaround 2003-02-24 21:26:01.000000000 +0100 -+++ glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c 2003-06-05 11:11:01.000000000 +0200 -@@ -56,6 +56,7 @@ tcsetattr (fd, optional_actions, termios - { - struct __kernel_termios k_termios; - unsigned long int cmd; -+ int retval; - - switch (optional_actions) - { -@@ -87,6 +88,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) diff --git a/glibc-2.16.0-avx-increase_BF_FRAME.patch b/glibc-2.3.6-avx-increase_BF_FRAME.patch similarity index 56% rename from glibc-2.16.0-avx-increase_BF_FRAME.patch rename to glibc-2.3.6-avx-increase_BF_FRAME.patch index 191ba6b..ee96eda 100644 --- a/glibc-2.16.0-avx-increase_BF_FRAME.patch +++ b/glibc-2.3.6-avx-increase_BF_FRAME.patch @@ -1,5 +1,5 @@ ---- glibc-2.16.0/crypt/x86.S.orig 2011-07-16 19:09:42.000000000 +0400 -+++ glibc-2.16.0/crypt/x86.S 2012-07-04 15:08:57.743556929 +0400 +--- crypt/x86.S 2011-07-16 11:09:42.000000000 -0400 ++++ crypt/x86.S.oden 2011-11-25 04:07:23.574489383 -0500 @@ -42,7 +42,7 @@ #define DO_ALIGN(log) .align (1 << (log)) #endif diff --git a/glibc-2.4.90-i586-hptiming.patch b/glibc-2.4.90-i586-hptiming.patch new file mode 100644 index 0000000..2378f7e --- /dev/null +++ b/glibc-2.4.90-i586-hptiming.patch @@ -0,0 +1,132 @@ +2006-05-17 Gwenole Beauchesne + + * Update and simplify for glibc 2.4.90. + +2002-12-07 Gwenole Beauchesne + + 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. */ ++#define NEED_HP_TIMING_HWCAP_AVAIL 1 ++ + #include + #include + #include +@@ -178,6 +181,12 @@ static void dl_main (const ElfW(Phdr) *p + static struct libname_list _dl_rtld_libname; + static struct libname_list _dl_rtld_libname2; + ++/* Run-time detect availability of high-precision timer? */ ++#ifdef HP_TIMING_HWCAP_AVAIL ++# undef HP_TIMING_AVAIL ++# define HP_TIMING_AVAIL HP_TIMING_HWCAP_AVAIL ++#endif ++ + /* We expect less than a second for relocation. */ + #ifdef HP_SMALL_TIMING_AVAIL + # undef HP_TIMING_AVAIL +@@ -311,9 +320,8 @@ _dl_start_final (void *arg, struct dl_st + + #endif + +-#if HP_TIMING_AVAIL +- HP_TIMING_NOW (GL(dl_cpuclock_offset)); +-#endif ++ if (HP_TIMING_AVAIL) ++ HP_TIMING_NOW (GL(dl_cpuclock_offset)); + + /* Initialize the stack end variable. */ + __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.4.90/sysdeps/generic/ldsodefs.h 2006-05-17 08:13:21.000000000 +0200 +@@ -408,7 +408,7 @@ struct rtld_global + /* The object to be initialized first. */ + EXTERN struct link_map *_dl_initfirst; + +-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL ++#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL || defined HP_TIMING_HWCAP_AVAIL + /* Start time on CPU clock. */ + EXTERN hp_timing_t _dl_cpuclock_offset; + #endif +@@ -619,7 +619,7 @@ struct rtld_global_ro + /* All search directories defined at startup. */ + EXTERN struct r_search_path_elem *_dl_init_all_dirs; + +-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL ++#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL || defined HP_TIMING_HWCAP_AVAIL + /* Overhead of a high-precision timing measurement. */ + EXTERN hp_timing_t _dl_hp_timing_overhead; + #endif +--- glibc-2.4.90/sysdeps/i386/i586/Makefile.i586-hptiming 2006-05-17 06:35:29.000000000 +0200 ++++ glibc-2.4.90/sysdeps/i386/i586/Makefile 2006-05-17 06:35:41.000000000 +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 @@ ++/* We can use the i686 implementation without changes. */ ++#include +--- glibc-2.4.90/sysdeps/i386/i586/hp-timing.h.i586-hptiming 2006-05-17 06:37:28.000000000 +0200 ++++ glibc-2.4.90/sysdeps/i386/i586/hp-timing.h 2006-05-17 08:30:06.000000000 +0200 +@@ -0,0 +1,43 @@ ++#ifndef _HP_HWCAP_TIMING_H ++#define _HP_HWCAP_TIMING_H 1 ++ ++/* We can use the i686 implementation with slight changes. */ ++#include ++ ++/* We need the definition of HWCAP_I386_TSC. */ ++#include ++ ++/* We need to perform a runtime check for the timestamp register. */ ++#undef HP_TIMING_AVAIL ++#define HP_TIMING_AVAIL (0) ++ ++/* HP_TIMING_HWCAP_AVAIL: this macro performs a run-time check for the ++ capability. */ ++#define HP_TIMING_HWCAP_AVAIL (_dl_hp_timing_avail()) ++ ++/* Perform the TSC check. */ ++#ifdef NEED_HP_TIMING_HWCAP_AVAIL ++static inline ++unsigned int ++_dl_cpuid_edx (unsigned int op) ++{ ++ unsigned int edx; ++ __asm__ __volatile__("push %%ebx ; cpuid ; pop %%ebx" ++ : "=d" (edx) : "a" (op) : "ecx"); ++ return edx; ++} ++ ++static int ++internal_function ++_dl_hp_timing_avail (void) ++{ ++ static int has_tsc = -1; ++ ++ if (__builtin_expect (has_tsc == -1, 0)) ++ has_tsc = (_dl_cpuid_edx(1) & HWCAP_I386_TSC) == HWCAP_I386_TSC; ++ ++ return has_tsc; ++} ++#endif ++ ++#endif /* hp-timing.h */ diff --git a/glibc-2.4.90-testsuite-rt-notparallel.patch b/glibc-2.4.90-testsuite-rt-notparallel.patch new file mode 100644 index 0000000..9a08847 --- /dev/null +++ b/glibc-2.4.90-testsuite-rt-notparallel.patch @@ -0,0 +1,24 @@ +2006-07-26 Gwenole Beauchesne + + * 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 diff --git a/glibc-2.16.0-mdv-wrapper_handle_sha.patch b/glibc-2.7-mdv-wrapper_handle_sha.patch similarity index 77% rename from glibc-2.16.0-mdv-wrapper_handle_sha.patch rename to glibc-2.7-mdv-wrapper_handle_sha.patch index 2184c77..662dcc4 100644 --- a/glibc-2.16.0-mdv-wrapper_handle_sha.patch +++ b/glibc-2.7-mdv-wrapper_handle_sha.patch @@ -1,67 +1,13 @@ ---- crypt/wrapper.c.org 2008-06-17 13:29:30.000000000 -0600 -+++ crypt/wrapper.c 2008-06-17 15:33:47.000000000 -0600 -@@ -54,6 +58,11 @@ extern char *__md5_crypt_r(const char *k - extern char *__des_crypt_r(const char *key, const char *salt, - struct crypt_data *data); - extern struct crypt_data _ufc_foobar; -+/* support for sha256-crypt and sha512-crypt */ -+extern char *__sha256_crypt_r (const char *key, const char *salt, -+ char *buffer, int buflen); -+extern char *__sha512_crypt_r (const char *key, const char *salt, -+ char *buffer, int buflen); - #endif - - static int _crypt_data_alloc(void **data, int *size, int need) -@@ -142,6 +151,10 @@ char *__crypt_rn(__const char *key, __co - return _crypt_blowfish_rn(key, setting, (char *)data, size); - if (setting[0] == '$' && setting[1] == '1') - return __md5_crypt_r(key, setting, (char *)data, size); -+ if (setting[0] == '$' && setting[1] == '5') -+ return __sha256_crypt_r(key, setting, (char *)data, size); -+ if (setting[0] == '$' && setting[1] == '6') -+ return __sha512_crypt_r(key, setting, (char *)data, size); - if (setting[0] == '$') goto out_einval; - if (setting[0] == '_') { - if (size < sizeof(struct _crypt_extended_data)) goto out_erange; -@@ -181,6 +194,16 @@ char *__crypt_ra(__const char *key, __co - return NULL; - return __md5_crypt_r(key, setting, (char *)*data, *size); - } -+ if (setting[0] == '$' && setting[1] == '5') { -+ if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) -+ return NULL; -+ return __sha256_crypt_r(key, setting, (char *)*data, *size); -+ } -+ if (setting[0] == '$' && setting[1] == '6') { -+ if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) -+ return NULL; -+ return __sha512_crypt_r(key, setting, (char *)*data, *size); -+ } - if (setting[0] == '$') goto out_einval; - if (setting[0] == '_') { - if (_crypt_data_alloc(data, size, -@@ -271,6 +294,12 @@ char *__crypt_gensalt_rn(__CONST char *p - if (!strncmp(prefix, "$1$", 3)) - use = _crypt_gensalt_md5_rn; - else -+ if (!strncmp(prefix, "$5$", 3)) -+ use = _crypt_gensalt_sha256c_rn; -+ else -+ if (!strncmp(prefix, "$6$", 3)) -+ use = _crypt_gensalt_sha512c_rn; -+ else - if (prefix[0] == '_') - use = _crypt_gensalt_extended_rn; - else ---- crypt/crypt_gensalt.c.org 2008-06-17 13:31:49.000000000 -0600 -+++ crypt/crypt_gensalt.c 2008-06-17 15:30:35.000000000 -0600 -@@ -109,3 +109,78 @@ char *_crypt_gensalt_md5_rn(unsigned lon +diff -Naurp glibc-2.14-121-g5551a7b/crypt/crypt_gensalt.c glibc-2.14-121-g5551a7b.oden/crypt/crypt_gensalt.c +--- glibc-2.14-121-g5551a7b/crypt/crypt_gensalt.c 2011-07-16 11:06:53.000000000 -0400 ++++ glibc-2.14-121-g5551a7b.oden/crypt/crypt_gensalt.c 2011-11-25 04:08:39.264489146 -0500 +@@ -122,3 +122,78 @@ char *_crypt_gensalt_md5_rn(const char * return output; } + +char *_crypt_gensalt_sha256c_rn(unsigned long count, -+ __CONST char *input, int size, char *output, int output_size) ++ const char *input, int size, char *output, int output_size) +{ + unsigned long value; + @@ -99,7 +45,7 @@ + + +char *_crypt_gensalt_sha512c_rn(unsigned long count, -+ __CONST char *input, int size, char *output, int output_size) ++ const char *input, int size, char *output, int output_size) +{ + unsigned long value; + @@ -134,15 +80,72 @@ + + return output; +} ---- crypt/crypt_gensalt.h.orig 2012-07-04 17:42:27.151565561 +0400 -+++ crypt/crypt_gensalt.h 2012-07-04 17:44:20.351588292 +0400 -@@ -26,5 +26,9 @@ +diff -Naurp glibc-2.14-121-g5551a7b/crypt/crypt_gensalt.h glibc-2.14-121-g5551a7b.oden/crypt/crypt_gensalt.h +--- glibc-2.14-121-g5551a7b/crypt/crypt_gensalt.h 2011-07-16 10:58:39.000000000 -0400 ++++ glibc-2.14-121-g5551a7b.oden/crypt/crypt_gensalt.h 2011-11-25 04:13:34.984489216 -0500 +@@ -26,5 +26,8 @@ extern char *_crypt_gensalt_extended_rn( const char *input, int size, char *output, int output_size); extern char *_crypt_gensalt_md5_rn(const char *prefix, unsigned long count, const char *input, int size, char *output, int output_size); +- +extern char *_crypt_gensalt_sha256c_rn(unsigned long count, + const char *input, int size, char *output, int output_size); +extern char *_crypt_gensalt_sha512c_rn(unsigned long count, + const char *input, int size, char *output, int output_size); - #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 04:08:23.654489356 -0500 ++++ glibc-2.14-121-g5551a7b.oden/crypt/wrapper.c 2011-11-25 04:08:39.264489146 -0500 +@@ -55,6 +55,11 @@ extern char *__md5_crypt_r(const char *k + extern char *__des_crypt_r(const char *key, const char *salt, + struct crypt_data *data); + extern struct crypt_data _ufc_foobar; ++/* support for sha256-crypt and sha512-crypt */ ++extern char *__sha256_crypt_r (const char *key, const char *salt, ++ char *buffer, int buflen); ++extern char *__sha512_crypt_r (const char *key, const char *salt, ++ char *buffer, int buflen); + #endif + + static int _crypt_data_alloc(void **data, int *size, int need) +@@ -140,6 +145,10 @@ char *__crypt_rn(__const char *key, __co + return _crypt_blowfish_rn(key, setting, (char *)data, size); + if (setting[0] == '$' && setting[1] == '1') + return __md5_crypt_r(key, setting, (char *)data, size); ++ if (setting[0] == '$' && setting[1] == '5') ++ return __sha256_crypt_r(key, setting, (char *)data, size); ++ if (setting[0] == '$' && setting[1] == '6') ++ return __sha512_crypt_r(key, setting, (char *)data, size); + if (setting[0] == '$') goto out_einval; + if (setting[0] == '_') { + if (size < sizeof(struct _crypt_extended_data)) goto out_erange; +@@ -179,6 +188,16 @@ char *__crypt_ra(__const char *key, __co + return NULL; + return __md5_crypt_r(key, setting, (char *)*data, *size); + } ++ if (setting[0] == '$' && setting[1] == '5') { ++ if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) ++ return NULL; ++ return __sha256_crypt_r(key, setting, (char *)*data, *size); ++ } ++ if (setting[0] == '$' && setting[1] == '6') { ++ if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) ++ return NULL; ++ return __sha512_crypt_r(key, setting, (char *)*data, *size); ++ } + if (setting[0] == '$') goto out_einval; + if (setting[0] == '_') { + if (_crypt_data_alloc(data, size, +@@ -270,6 +289,12 @@ char *__crypt_gensalt_rn(const char *pre + if (!strncmp(prefix, "$1$", 3)) + use = _crypt_gensalt_md5_rn; + else ++ if (!strncmp(prefix, "$5$", 3)) ++ use = _crypt_gensalt_sha256c_rn; ++ else ++ if (!strncmp(prefix, "$6$", 3)) ++ use = _crypt_gensalt_sha512c_rn; ++ else + if (prefix[0] == '_') + use = _crypt_gensalt_extended_rn; + else diff --git a/glibc-2.9-avx-relocate_fcrypt.patch b/glibc-2.9-avx-relocate_fcrypt.patch new file mode 100644 index 0000000..b4e4f2c --- /dev/null +++ b/glibc-2.9-avx-relocate_fcrypt.patch @@ -0,0 +1,49 @@ +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 diff --git a/glibc-2.9-share-locale.patch b/glibc-2.9-share-locale.patch new file mode 100644 index 0000000..90a8ad7 --- /dev/null +++ b/glibc-2.9-share-locale.patch @@ -0,0 +1,36 @@ +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 + ;; + *) diff --git a/glibc-check.sh b/glibc-check.sh old mode 100755 new mode 100644 diff --git a/glibc-fedora.patch b/glibc-fedora.patch index 7b58d3b..889b8cf 100644 --- a/glibc-fedora.patch +++ b/glibc-fedora.patch @@ -1,7 +1,7 @@ diff -Nrup a/ChangeLog b/ChangeLog ---- a/ChangeLog 2012-06-05 07:42:49.000000000 -0600 -+++ b/ChangeLog 2012-06-07 12:15:21.516319798 -0600 -@@ -12178,6 +12178,11 @@ +--- a/ChangeLog 2012-01-01 05:16:32.000000000 -0700 ++++ b/ChangeLog 2012-01-01 20:41:26.621439845 -0700 +@@ -2542,6 +2542,11 @@ * sysdeps/mach/hurd/sys/param.h (DEV_BSIZE): New macro. @@ -13,7 +13,7 @@ diff -Nrup a/ChangeLog b/ChangeLog 2011-09-08 Andreas Schwab * elf/dl-load.c (lose): Check for non-null L. -@@ -12440,6 +12445,11 @@ +@@ -2804,6 +2809,11 @@ * sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix cfi directive. @@ -25,7 +25,7 @@ diff -Nrup a/ChangeLog b/ChangeLog 2011-08-24 David S. Miller * sysdeps/sparc/sparc64/strcmp.S: Rewrite. -@@ -13245,6 +13255,14 @@ +@@ -3609,6 +3619,14 @@ * config.make.in: Likewise. * malloc/Makefile: Likewise. @@ -40,7 +40,7 @@ diff -Nrup a/ChangeLog b/ChangeLog 2011-06-27 Andreas Schwab * iconvdata/gb18030.c (BODY for TO_LOOP): Fix encoding of non-BMP -@@ -13376,6 +13394,10 @@ +@@ -3740,6 +3758,10 @@ * inet/getnetgrent_r.c: Use DL_CALL_FCT in several places. @@ -51,7 +51,7 @@ diff -Nrup a/ChangeLog b/ChangeLog 2011-06-20 David S. Miller * sysdeps/sparc/sparc32/dl-plt.h: Protect against multiple -@@ -13998,6 +14020,13 @@ +@@ -4362,6 +4384,13 @@ * libio/Makefile (tests): Add bug-fclose1. * libio/bug-fclose1.c: New file. @@ -65,7 +65,7 @@ diff -Nrup a/ChangeLog b/ChangeLog 2011-05-12 Ulrich Drepper [BZ #12511] -@@ -14275,13 +14304,6 @@ +@@ -4639,13 +4668,6 @@ * stdlib/bug-getcontext.c: New file. * stdlib/Makefile: Add rules to build and run bug-getcontext. @@ -79,18 +79,24 @@ diff -Nrup a/ChangeLog b/ChangeLog 2011-04-11 Andreas Krebbel * sysdeps/s390/s390-32/elf/start.S (_start): Skip extra zeroes -@@ -14579,6 +14601,10 @@ +@@ -4943,6 +4990,16 @@ $LDFLAGS and -nostdlib -nostartfiles to linking step. Change main to _start. +2011-03-18 Andreas Schwab + + * elf/ldd.bash.in: Never run file directly. ++ ++2011-03-07 Andreas Schwab ++ ++ * include/link.h (struct link_map): Remove l_orig_initfini. ++ * elf/dl-close.c (_dl_close_worker): Revert its use. ++ * elf/dl-deps.c (_dl_map_object_deps): Likewise. + 2011-03-06 Ulrich Drepper * elf/dl-load.c (_dl_map_object): If we are looking for the first -@@ -14795,6 +14821,12 @@ +@@ -5159,6 +5216,12 @@ * shadow/sgetspent.c: Check return value of __sgetspent_r instead of errno. @@ -103,12 +109,19 @@ diff -Nrup a/ChangeLog b/ChangeLog 2011-01-19 Ulrich Drepper [BZ #11724] -@@ -15482,6 +15514,19 @@ +@@ -5846,6 +5909,26 @@ * sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS): Mask out sign-bit copies when constructing f_fsid. +2010-09-27 Andreas Schwab + ++ * include/link.h (struct link_map): Add l_free_initfini. ++ * elf/dl-deps.c (_dl_map_object_deps): Set it when assigning ++ l_initfini. ++ * elf/rtld.c (dl_main): Clear it on all objects loaded on startup. ++ * elf/dl-libc.c (free_mem): Free l_initfini if l_free_initfini is ++ set. ++ + [BZ #11561] + * posix/regcomp.c (parse_bracket_exp): When looking up collating + elements compare against the byte sequence of it, not its name. @@ -123,7 +136,7 @@ diff -Nrup a/ChangeLog b/ChangeLog 2010-09-24 Petr Baudis * debug/stack_chk_fail_local.c: Add missing licence exception. -@@ -16274,6 +16319,17 @@ +@@ -6638,6 +6721,17 @@ call returning > 0 value. * sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise. @@ -141,7 +154,7 @@ diff -Nrup a/ChangeLog b/ChangeLog 2010-06-07 Andreas Schwab * dlfcn/Makefile: Remove explicit dependencies on libc.so and -@@ -16326,6 +16382,21 @@ +@@ -6690,6 +6784,21 @@ * hurd/hurd/fd.h (__file_name_lookup_at): Update comment. * sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS. @@ -164,8 +177,8 @@ diff -Nrup a/ChangeLog b/ChangeLog * sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi. diff -Nrup a/ChangeLog.15 b/ChangeLog.15 ---- a/ChangeLog.15 2012-06-05 07:42:49.000000000 -0600 -+++ b/ChangeLog.15 2012-06-07 12:15:21.518319790 -0600 +--- a/ChangeLog.15 2012-01-01 05:16:32.000000000 -0700 ++++ b/ChangeLog.15 2012-01-01 20:41:26.623439845 -0700 @@ -477,6 +477,14 @@ 2004-11-26 Jakub Jelinek @@ -181,7 +194,33 @@ diff -Nrup a/ChangeLog.15 b/ChangeLog.15 * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR. 2004-11-26 Kaz Kojima -@@ -3182,6 +3190,17 @@ +@@ -1103,6 +1111,13 @@ + * sysdeps/generic/tempname.c (__path_search): Add missing argument + TRY_TMPDIR. + ++2004-11-02 Jakub Jelinek ++ ++ * include/features.h (__USE_FORTIFY_LEVEL): Also set for Red Hat ++ GCC 3.4.x-RH >= 3.4.2-8. ++ * debug/tst-chk1.c (do_test): Deal with GCC 3.4.x-RH not ++ being able to recognize subobjects. ++ + 2004-10-31 Mariusz Mazur + + * sysdeps/unix/sysv/linux/alpha/setregid.c: New file. +@@ -1443,6 +1458,11 @@ + * sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ... + (__readonly_area): ... this. + ++2004-10-19 Jakub Jelinek ++ ++ * include/features.h (__USE_FORTIFY_LEVEL): Enable even with ++ Red Hat gcc4 4.0.0 and above. ++ + 2004-10-18 Jakub Jelinek + + * sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking +@@ -3182,6 +3202,23 @@ before return type. * locale/localename.c (__current_locale_name): Likewise. @@ -195,13 +234,19 @@ diff -Nrup a/ChangeLog.15 b/ChangeLog.15 + Call add_arch_dirs. + * sysdeps/generic/dl-cache.h (arch_startup, add_arch_dirs): Define. + * sysdeps/unix/sysv/linux/i386/dl-cache.h: New file. ++ * sysdeps/unix/sysv/linux/ia64/dl-cache.h (EMUL_HACK, arch_startup, ++ add_arch_dirs): Define. ++ * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Prepend ++ /emul/ia32-linux before the 32-bit ld.so pathname. ++ * sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file. ++ * sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file. + 2004-08-30 Roland McGrath * scripts/extract-abilist.awk: If `lastversion' variable defined, omit diff -Nrup a/ChangeLog.16 b/ChangeLog.16 ---- a/ChangeLog.16 2012-06-05 07:42:49.000000000 -0600 -+++ b/ChangeLog.16 2012-06-07 12:15:21.523319772 -0600 +--- a/ChangeLog.16 2012-01-01 05:16:32.000000000 -0700 ++++ b/ChangeLog.16 2012-01-01 20:41:26.626439845 -0700 @@ -2042,6 +2042,9 @@ (__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT followed by __THROW. @@ -225,8 +270,8 @@ diff -Nrup a/ChangeLog.16 b/ChangeLog.16 * libio/genops.c: Include . 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 +--- a/ChangeLog.17 2012-01-01 05:16:32.000000000 -0700 ++++ b/ChangeLog.17 2012-01-01 20:41:26.629439844 -0700 @@ -256,6 +256,12 @@ * Makerules (libc-abis): Fix search for libc-abis in add-ons. @@ -252,7 +297,19 @@ diff -Nrup a/ChangeLog.17 b/ChangeLog.17 2009-07-21 Ulrich Drepper * sysdeps/x86_64/multiarch/strstr.c: Minor cleanups. Remove -@@ -11818,6 +11829,10 @@ d2009-10-30 Ulrich Drepper ++ ++ * timezone/zic.c (stringzone): Don't try to generate a POSIX TZ ++ string when the timezone ends in DST. ++ + 2009-06-26 Ulrich Drepper + + * resolv/resolv.h: Define RES_SNGLKUPREOP. +@@ -11818,6 +11834,10 @@ d2009-10-30 Ulrich Drepper [BZ #4364] -@@ -13075,6 +13090,15 @@ d2009-10-30 Ulrich Drepper . */ +--- a/debug/tst-chk1.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/debug/tst-chk1.c 2012-01-01 20:41:26.636439843 -0700 +@@ -17,6 +17,9 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ +/* Hack: make sure GCC doesn't know __chk_fail () will not return. */ +#define __noreturn__ @@ -358,7 +428,7 @@ diff -Nrup a/debug/tst-chk1.c b/debug/tst-chk1.c #include #include #include -@@ -244,7 +247,7 @@ do_test (void) +@@ -243,7 +246,7 @@ do_test (void) if (memcmp (a.buf1, "aabcdabcjj", 10)) FAIL (); @@ -367,7 +437,7 @@ diff -Nrup a/debug/tst-chk1.c b/debug/tst-chk1.c /* The following tests are supposed to crash with -D_FORTIFY_SOURCE=2 and sufficient GCC support, as the string operations overflow from a.buf1 into a.buf2. */ -@@ -359,7 +362,7 @@ do_test (void) +@@ -358,7 +361,7 @@ do_test (void) memset (a.buf1 + 9, 'j', l0 + 2); CHK_FAIL_END @@ -377,9 +447,9 @@ diff -Nrup a/debug/tst-chk1.c b/debug/tst-chk1.c # else # define O 1 diff -Nrup a/elf/Makefile b/elf/Makefile ---- a/elf/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/elf/Makefile 2012-06-07 12:15:21.572319589 -0600 -@@ -50,6 +50,7 @@ include ../Makeconfig +--- a/elf/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/Makefile 2012-01-01 20:41:26.637439843 -0700 +@@ -135,6 +135,7 @@ include ../Makeconfig ifeq ($(unwind-find-fde),yes) routines += unwind-dw2-fde-glibc shared-only-routines += unwind-dw2-fde-glibc @@ -387,10 +457,61 @@ diff -Nrup a/elf/Makefile b/elf/Makefile endif before-compile = $(objpfx)trusted-dirs.h +diff -Nrup a/elf/dl-close.c b/elf/dl-close.c +--- a/elf/dl-close.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/dl-close.c 2012-01-01 20:41:26.638439843 -0700 +@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map) + if (map->l_direct_opencount > 0 || map->l_type != lt_loaded + || dl_close_state != not_pending) + { +- if (map->l_direct_opencount == 0) +- { +- if (map->l_type == lt_loaded) +- dl_close_state = rerun; +- else if (map->l_type == lt_library) +- { +- struct link_map **oldp = map->l_initfini; +- map->l_initfini = map->l_orig_initfini; +- _dl_scope_free (oldp); +- } +- } ++ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded) ++ dl_close_state = rerun; + + /* There are still references to this object. Do nothing more. */ + if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) +diff -Nrup a/elf/dl-deps.c b/elf/dl-deps.c +--- a/elf/dl-deps.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/dl-deps.c 2012-01-01 20:41:26.638439843 -0700 +@@ -489,6 +489,7 @@ _dl_map_object_deps (struct link_map *ma + nneeded * sizeof needed[0]); + atomic_write_barrier (); + l->l_initfini = l_initfini; ++ l->l_free_initfini = 1; + } + + /* If we have no auxiliary objects just go on to the next map. */ +@@ -689,6 +690,7 @@ Filters not supported with LD_TRACE_PREL + l_initfini[nlist] = NULL; + atomic_write_barrier (); + map->l_initfini = l_initfini; ++ map->l_free_initfini = 1; + if (l_reldeps != NULL) + { + atomic_write_barrier (); +@@ -697,7 +699,7 @@ Filters not supported with LD_TRACE_PREL + _dl_scope_free (old_l_reldeps); + } + if (old_l_initfini != NULL) +- map->l_orig_initfini = old_l_initfini; ++ _dl_scope_free (old_l_initfini); + + if (errno_reason) + _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname, diff -Nrup a/elf/dl-init.c b/elf/dl-init.c ---- a/elf/dl-init.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/elf/dl-init.c 2012-06-07 12:15:21.573319585 -0600 -@@ -23,11 +23,9 @@ +--- a/elf/dl-init.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/dl-init.c 2012-01-01 20:41:26.639439843 -0700 +@@ -24,11 +24,9 @@ /* Type of the initializer. */ typedef void (*init_t) (int, char **, char **); @@ -402,7 +523,7 @@ diff -Nrup a/elf/dl-init.c b/elf/dl-init.c static void -@@ -132,9 +130,7 @@ _dl_init (struct link_map *main_map, int +@@ -133,9 +131,7 @@ _dl_init (struct link_map *main_map, int while (i-- > 0) call_init (main_map->l_initfini[i], argc, argv, env); @@ -412,10 +533,39 @@ diff -Nrup a/elf/dl-init.c b/elf/dl-init.c -#endif } INTDEF (_dl_init) +diff -Nrup a/elf/dl-libc.c b/elf/dl-libc.c +--- a/elf/dl-libc.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/dl-libc.c 2012-01-01 20:41:26.639439843 -0700 +@@ -270,13 +270,13 @@ libc_freeres_fn (free_mem) + + for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns) + { +- /* Remove all additional names added to the objects. */ + for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next) + { + struct libname_list *lnp = l->l_libname->next; + + l->l_libname->next = NULL; + ++ /* Remove all additional names added to the objects. */ + while (lnp != NULL) + { + struct libname_list *old = lnp; +@@ -284,6 +284,10 @@ libc_freeres_fn (free_mem) + if (! old->dont_free) + free (old); + } ++ ++ /* Free the initfini dependency list. */ ++ if (l->l_free_initfini) ++ free (l->l_initfini); + } + + if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0 diff -Nrup a/elf/dl-load.c b/elf/dl-load.c ---- a/elf/dl-load.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/elf/dl-load.c 2012-06-07 12:15:21.575319577 -0600 -@@ -249,8 +249,7 @@ is_trusted_path_normalize (const char *p +--- a/elf/dl-load.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/dl-load.c 2012-01-01 20:41:26.640439842 -0700 +@@ -250,8 +250,7 @@ is_trusted_path_normalize (const char *p static size_t @@ -425,7 +575,7 @@ diff -Nrup a/elf/dl-load.c b/elf/dl-load.c { size_t len; bool is_curly = false; -@@ -279,12 +278,6 @@ is_dst (const char *start, const char *n +@@ -280,12 +279,6 @@ is_dst (const char *start, const char *n && (!is_path || name[len] != ':')) return 0; @@ -438,7 +588,7 @@ diff -Nrup a/elf/dl-load.c b/elf/dl-load.c return len; } -@@ -299,13 +292,10 @@ _dl_dst_count (const char *name, int is_ +@@ -300,13 +293,10 @@ _dl_dst_count (const char *name, int is_ { size_t len; @@ -455,7 +605,7 @@ diff -Nrup a/elf/dl-load.c b/elf/dl-load.c ++cnt; name = strchr (name + len, '$'); -@@ -338,9 +328,16 @@ _dl_dst_substitute (struct link_map *l, +@@ -339,9 +329,16 @@ _dl_dst_substitute (struct link_map *l, size_t len; ++name; @@ -474,7 +624,7 @@ diff -Nrup a/elf/dl-load.c b/elf/dl-load.c #ifndef SHARED if (l == NULL) repl = _dl_get_origin (); -@@ -351,9 +348,9 @@ _dl_dst_substitute (struct link_map *l, +@@ -352,9 +349,9 @@ _dl_dst_substitute (struct link_map *l, check_for_trusted = (INTUSE(__libc_enable_secure) && l->l_type == lt_executable); } @@ -486,7 +636,7 @@ diff -Nrup a/elf/dl-load.c b/elf/dl-load.c repl = DL_DST_LIB; if (repl != NULL && repl != (const char *) -1) -@@ -373,6 +370,7 @@ _dl_dst_substitute (struct link_map *l, +@@ -374,6 +371,7 @@ _dl_dst_substitute (struct link_map *l, element, but keep an empty element at the end. */ if (wp == result && is_path && *name == ':' && name[1] != '\0') ++name; @@ -495,9 +645,9 @@ diff -Nrup a/elf/dl-load.c b/elf/dl-load.c else /* No DST we recognize. */ diff -Nrup a/elf/dl-support.c b/elf/dl-support.c ---- a/elf/dl-support.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/elf/dl-support.c 2012-06-07 12:15:21.576319573 -0600 -@@ -81,10 +81,8 @@ unsigned long long _dl_load_adds; +--- a/elf/dl-support.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/dl-support.c 2012-01-01 20:41:26.641439841 -0700 +@@ -82,10 +82,8 @@ unsigned long long _dl_load_adds; create a fake scope containing nothing. */ struct r_scope_elem _dl_initial_searchlist; @@ -509,9 +659,9 @@ diff -Nrup a/elf/dl-support.c b/elf/dl-support.c /* Random data provided by the kernel. */ void *_dl_random; diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c ---- a/elf/ldconfig.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/elf/ldconfig.c 2012-06-07 12:15:21.577319570 -0600 -@@ -1033,17 +1033,19 @@ search_dirs (void) +--- a/elf/ldconfig.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/ldconfig.c 2012-01-01 20:41:26.641439841 -0700 +@@ -1034,17 +1034,19 @@ search_dirs (void) static void parse_conf_include (const char *config_file, unsigned int lineno, @@ -533,7 +683,7 @@ diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c if (do_chroot && opt_chroot) { -@@ -1106,7 +1108,14 @@ Warning: ignoring configuration file tha +@@ -1105,7 +1107,14 @@ parse_conf (const char *filename, bool d cp += 8; while ((dir = strsep (&cp, " \t")) != NULL) if (dir[0] != '\0') @@ -549,7 +699,7 @@ diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c } else if (!strncasecmp (cp, "hwcap", 5) && isblank (cp[5])) { -@@ -1169,7 +1178,7 @@ Warning: ignoring configuration file tha +@@ -1168,7 +1177,7 @@ parse_conf (const char *filename, bool d config files to read. */ static void parse_conf_include (const char *config_file, unsigned int lineno, @@ -558,7 +708,7 @@ diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c { if (opt_chroot && pattern[0] != '/') error (EXIT_FAILURE, 0, -@@ -1201,7 +1210,7 @@ parse_conf_include (const char *config_f +@@ -1200,7 +1209,7 @@ parse_conf_include (const char *config_f { case 0: for (size_t i = 0; i < gl.gl_pathc; ++i) @@ -567,7 +717,7 @@ diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c globfree64 (&gl); break; -@@ -1244,6 +1253,8 @@ main (int argc, char **argv) +@@ -1243,6 +1252,8 @@ main (int argc, char **argv) /* Set the text message domain. */ textdomain (_libc_intl_domainname); @@ -576,7 +726,7 @@ diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c /* Parse and process arguments. */ int remaining; argp_parse (&argp, argc, argv, 0, &remaining, NULL); -@@ -1353,12 +1364,14 @@ main (int argc, char **argv) +@@ -1352,12 +1363,14 @@ main (int argc, char **argv) if (!opt_only_cline) { @@ -593,9 +743,9 @@ diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE; diff -Nrup a/elf/ldd.bash.in b/elf/ldd.bash.in ---- a/elf/ldd.bash.in 2012-06-05 07:42:49.000000000 -0600 -+++ b/elf/ldd.bash.in 2012-06-07 12:15:21.577319570 -0600 -@@ -166,18 +166,6 @@ warning: you do not have execution permi +--- a/elf/ldd.bash.in 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/ldd.bash.in 2012-01-01 20:41:26.642439841 -0700 +@@ -167,18 +167,6 @@ warning: you do not have execution permi fi done case $ret in @@ -614,7 +764,7 @@ diff -Nrup a/elf/ldd.bash.in b/elf/ldd.bash.in 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 permi +@@ -186,7 +174,7 @@ warning: you do not have execution permi result=1 } ;; @@ -624,9 +774,9 @@ diff -Nrup a/elf/ldd.bash.in b/elf/ldd.bash.in ;; *) diff -Nrup a/elf/rtld.c b/elf/rtld.c ---- a/elf/rtld.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/elf/rtld.c 2012-06-07 12:15:21.579319564 -0600 -@@ -106,7 +106,6 @@ static struct audit_list +--- a/elf/rtld.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/rtld.c 2012-01-01 20:41:26.643439841 -0700 +@@ -107,7 +107,6 @@ static struct audit_list struct audit_list *next; } *audit_list; @@ -634,7 +784,7 @@ diff -Nrup a/elf/rtld.c b/elf/rtld.c /* 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 +@@ -117,7 +116,6 @@ static struct audit_list never be called. */ int _dl_starting_up = 0; INTVARDEF(_dl_starting_up) @@ -653,7 +803,7 @@ diff -Nrup a/elf/rtld.c b/elf/rtld.c if (*user_entry == (ElfW(Addr)) ENTRY_POINT) { -@@ -1408,7 +1404,9 @@ of this helper program; chances are you +@@ -1397,7 +1393,9 @@ of this helper program; chances are you char *copy = malloc (len); if (copy == NULL) _dl_fatal_printf ("out of memory\n"); @@ -664,7 +814,15 @@ diff -Nrup a/elf/rtld.c b/elf/rtld.c } /* Add the vDSO to the object list. */ -@@ -2343,7 +2341,6 @@ ERROR: ld.so: object '%s' cannot be load +@@ -2276,6 +2274,7 @@ ERROR: ld.so: object '%s' cannot be load + lnp->dont_free = 1; + lnp = lnp->next; + } ++ l->l_free_initfini = 0; + + if (l != &GL(dl_rtld_map)) + _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0, +@@ -2327,7 +2326,6 @@ ERROR: ld.so: object '%s' cannot be load /* Make sure no new search directories have been added. */ assert (GLRO(dl_init_all_dirs) == GL(dl_all_dirs)); @@ -674,18 +832,77 @@ diff -Nrup a/elf/rtld.c b/elf/rtld.c /* There was an explicit ref to the dynamic linker as a shared lib. diff -Nrup a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h --- a/include/bits/stdlib-ldbl.h 1969-12-31 17:00:00.000000000 -0700 -+++ b/include/bits/stdlib-ldbl.h 2012-06-07 12:15:21.580319560 -0600 ++++ b/include/bits/stdlib-ldbl.h 2012-01-01 20:41:26.644439841 -0700 @@ -0,0 +1 @@ +#include diff -Nrup a/include/bits/wchar-ldbl.h b/include/bits/wchar-ldbl.h --- a/include/bits/wchar-ldbl.h 1969-12-31 17:00:00.000000000 -0700 -+++ b/include/bits/wchar-ldbl.h 2012-06-07 12:15:21.580319560 -0600 ++++ b/include/bits/wchar-ldbl.h 2012-01-01 20:41:26.644439841 -0700 @@ -0,0 +1 @@ +#include +diff -Nrup a/include/features.h b/include/features.h +--- a/include/features.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/include/features.h 2012-01-01 20:41:26.644439841 -0700 +@@ -310,8 +310,13 @@ + #endif + + #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ +- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 +-# if _FORTIFY_SOURCE > 1 ++ && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 ++# if !__GNUC_PREREQ (4, 1) ++# ifdef __GNUC_RH_RELEASE__ ++# warning _FORTIFY_SOURCE supported only with GCC 4.1 and later ++# endif ++# define __USE_FORTIFY_LEVEL 0 ++# elif _FORTIFY_SOURCE > 1 + # define __USE_FORTIFY_LEVEL 2 + # else + # define __USE_FORTIFY_LEVEL 1 +diff -Nrup a/include/libc-symbols.h b/include/libc-symbols.h +--- a/include/libc-symbols.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/include/libc-symbols.h 2012-01-01 20:41:26.645439841 -0700 +@@ -626,7 +626,7 @@ for linking") + # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) + # define libc_hidden_def(name) hidden_def (name) + # define libc_hidden_weak(name) hidden_weak (name) +-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version) ++# define libc_hidden_nolink(name, version) hidden_def (name) + # define libc_hidden_ver(local, name) hidden_ver (local, name) + # define libc_hidden_data_def(name) hidden_data_def (name) + # define libc_hidden_data_weak(name) hidden_data_weak (name) diff -Nrup a/include/link.h b/include/link.h ---- a/include/link.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/include/link.h 2012-06-07 12:15:21.581319556 -0600 -@@ -289,7 +289,7 @@ struct link_map +--- a/include/link.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/include/link.h 2012-01-01 20:41:26.646439841 -0700 +@@ -1,6 +1,6 @@ + /* Data structure for communication from the run-time dynamic linker for + loaded ELF shared objects. +- Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. ++ Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -192,6 +192,9 @@ struct link_map + during LD_TRACE_PRELINKING=1 + contains any DT_SYMBOLIC + libraries. */ ++ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be ++ freed, ie. not allocated with ++ the dummy malloc in ld.so. */ + + /* Collected information about own RPATH directories. */ + struct r_search_path_struct l_rpath_dirs; +@@ -240,9 +243,6 @@ struct link_map + + /* List of object in order of the init and fini calls. */ + struct link_map **l_initfini; +- /* The init and fini list generated at startup, saved when the +- object is also loaded dynamically. */ +- struct link_map **l_orig_initfini; + + /* List of the dependencies introduced through symbol binding. */ + struct link_map_reldeps +@@ -290,7 +290,7 @@ struct link_map #endif #ifndef FORCED_DYNAMIC_TLS_OFFSET # if NO_TLS_OFFSET == 0 @@ -695,19 +912,18 @@ diff -Nrup a/include/link.h b/include/link.h # define FORCED_DYNAMIC_TLS_OFFSET -2 # else diff -Nrup a/include/sys/resource.h b/include/sys/resource.h ---- a/include/sys/resource.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/include/sys/resource.h 2012-06-07 12:15:21.582319552 -0600 -@@ -14,5 +14,6 @@ extern int __getrusage (enum __rusage_wh +--- a/include/sys/resource.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/include/sys/resource.h 2012-01-01 20:41:26.647439841 -0700 +@@ -13,4 +13,5 @@ extern int __getrusage (enum __rusage_wh extern int __setrlimit (enum __rlimit_resource __resource, const struct rlimit *__rlimits); +libc_hidden_proto (__getrlimit) #endif - #endif diff -Nrup a/inet/Makefile b/inet/Makefile ---- a/inet/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/inet/Makefile 2012-06-07 12:15:21.582319552 -0600 -@@ -54,6 +54,8 @@ tests := htontest test_ifindex tst-ntoa +--- a/inet/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/inet/Makefile 2012-01-01 20:41:26.647439841 -0700 +@@ -57,6 +57,8 @@ tests := htontest test_ifindex tst-ntoa include ../Rules @@ -717,9 +933,9 @@ diff -Nrup a/inet/Makefile b/inet/Makefile CFLAGS-gethstbyad_r.c = -DUSE_NSCD=1 -fexceptions diff -Nrup a/intl/locale.alias b/intl/locale.alias ---- a/intl/locale.alias 2012-06-05 07:42:49.000000000 -0600 -+++ b/intl/locale.alias 2012-06-07 12:15:21.583319548 -0600 -@@ -56,8 +56,6 @@ korean ko_KR.eucKR +--- a/intl/locale.alias 2012-01-01 05:16:32.000000000 -0700 ++++ b/intl/locale.alias 2012-01-01 20:41:26.647439841 -0700 +@@ -57,8 +57,6 @@ korean ko_KR.eucKR korean.euc ko_KR.eucKR ko_KR ko_KR.eucKR lithuanian lt_LT.ISO-8859-13 @@ -729,9 +945,9 @@ diff -Nrup a/intl/locale.alias b/intl/locale.alias nynorsk nn_NO.ISO-8859-1 polish pl_PL.ISO-8859-2 diff -Nrup a/libio/stdio.h b/libio/stdio.h ---- a/libio/stdio.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/libio/stdio.h 2012-06-07 12:15:21.584319544 -0600 -@@ -168,10 +168,12 @@ typedef _G_fpos64_t fpos64_t; +--- a/libio/stdio.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/libio/stdio.h 2012-01-01 20:41:26.648439841 -0700 +@@ -169,10 +169,12 @@ typedef _G_fpos64_t fpos64_t; extern struct _IO_FILE *stdin; /* Standard input stream. */ extern struct _IO_FILE *stdout; /* Standard output stream. */ extern struct _IO_FILE *stderr; /* Standard error output stream. */ @@ -745,8 +961,8 @@ diff -Nrup a/libio/stdio.h b/libio/stdio.h __BEGIN_NAMESPACE_STD /* Remove file FILENAME. */ diff -Nrup a/locale/iso-4217.def b/locale/iso-4217.def ---- a/locale/iso-4217.def 2012-06-05 07:42:49.000000000 -0600 -+++ b/locale/iso-4217.def 2012-06-07 12:15:21.584319544 -0600 +--- a/locale/iso-4217.def 2012-01-01 05:16:32.000000000 -0700 ++++ b/locale/iso-4217.def 2012-01-01 20:41:26.649439841 -0700 @@ -8,6 +8,7 @@ * * !!! The list has to be sorted !!! @@ -839,9 +1055,9 @@ diff -Nrup a/locale/iso-4217.def b/locale/iso-4217.def DEFINE_INT_CURR("QAR") /* Qatar Rial */ DEFINE_INT_CURR("ROL") /* Romanian Leu */ 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 +--- a/locale/programs/locarchive.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/locale/programs/locarchive.c 2012-01-01 20:41:26.649439841 -0700 +@@ -253,9 +253,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); @@ -854,7 +1070,7 @@ diff -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c static bool -@@ -635,7 +635,7 @@ close_archive (struct locarhandle *ah) +@@ -636,7 +636,7 @@ close_archive (struct locarhandle *ah) #include "../../intl/explodename.c" #include "../../intl/l10nflist.c" @@ -863,7 +1079,7 @@ diff -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c insert_name (struct locarhandle *ah, const char *name, size_t name_len, bool replace) { -@@ -693,7 +693,7 @@ insert_name (struct locarhandle *ah, +@@ -694,7 +694,7 @@ insert_name (struct locarhandle *ah, return &namehashtab[idx]; } @@ -873,9 +1089,9 @@ diff -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c const char *oldname, uint32_t *locrec_offset_p) { diff -Nrup a/localedata/ChangeLog b/localedata/ChangeLog ---- a/localedata/ChangeLog 2012-06-05 07:42:49.000000000 -0600 -+++ b/localedata/ChangeLog 2012-06-07 12:15:21.683319174 -0600 -@@ -181,6 +181,14 @@ +--- a/localedata/ChangeLog 2012-01-01 05:16:32.000000000 -0700 ++++ b/localedata/ChangeLog 2012-01-01 20:41:26.651439841 -0700 +@@ -90,6 +90,14 @@ * tests-mbwc/tst_funcs.h (TST_DECL_VARS, TST_HEAD_LOCALE): Remove unused variable. @@ -891,9 +1107,9 @@ diff -Nrup a/localedata/ChangeLog b/localedata/ChangeLog [BZ #12788] 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 +--- a/localedata/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/localedata/Makefile 2012-01-01 20:41:26.652439840 -0700 +@@ -224,6 +224,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo echo -n '...'; \ input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \ $(LOCALEDEF) --alias-file=../intl/locale.alias \ @@ -902,8 +1118,8 @@ diff -Nrup a/localedata/Makefile b/localedata/Makefile $(addprefix --prefix=,$(install_root)) $$locale; \ echo ' done'; \ diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED ---- a/localedata/SUPPORTED 2012-06-05 07:42:49.000000000 -0600 -+++ b/localedata/SUPPORTED 2012-06-07 12:15:21.805318719 -0600 +--- a/localedata/SUPPORTED 2012-01-01 05:16:32.000000000 -0700 ++++ b/localedata/SUPPORTED 2012-01-01 20:41:26.652439840 -0700 @@ -88,6 +88,7 @@ cy_GB.UTF-8/UTF-8 \ cy_GB/ISO-8859-14 \ da_DK.UTF-8/UTF-8 \ @@ -928,7 +1144,7 @@ diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED en_ZA.UTF-8/UTF-8 \ en_ZA/ISO-8859-1 \ en_ZM/UTF-8 \ -@@ -317,6 +320,8 @@ nl_NL/ISO-8859-1 \ +@@ -316,6 +319,8 @@ nl_NL/ISO-8859-1 \ nl_NL@euro/ISO-8859-15 \ nn_NO.UTF-8/UTF-8 \ nn_NO/ISO-8859-1 \ @@ -937,7 +1153,7 @@ diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED nr_ZA/UTF-8 \ nso_ZA/UTF-8 \ oc_FR.UTF-8/UTF-8 \ -@@ -378,6 +383,7 @@ sv_FI/ISO-8859-1 \ +@@ -377,6 +382,7 @@ sv_FI/ISO-8859-1 \ sv_FI@euro/ISO-8859-15 \ sv_SE.UTF-8/UTF-8 \ sv_SE/ISO-8859-1 \ @@ -946,35 +1162,39 @@ diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED sw_TZ/UTF-8 \ ta_IN/UTF-8 \ 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 "" d_fmt "" t_fmt "" --am_pm "";"" +-am_pm "";"" +-t_fmt_ampm "" +am_pm "";"" - t_fmt_ampm "" --date_fmt "/ ++t_fmt_ampm "" +date_fmt "/ - / - " - first_workday 2 ++/ ++" + END LC_TIME + + LC_MESSAGES 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 "" d_fmt "" t_fmt "" --am_pm "";"" +-am_pm "";"" +-t_fmt_ampm "" +am_pm "";"" - t_fmt_ampm "" - date_fmt "/ ++t_fmt_ampm "" + date_fmt "/ / + " diff -Nrup a/localedata/locales/no_NO b/localedata/locales/no_NO --- a/localedata/locales/no_NO 1969-12-31 17:00:00.000000000 -0700 -+++ b/localedata/locales/no_NO 2012-06-07 12:15:21.806318715 -0600 ++++ b/localedata/locales/no_NO 2012-01-01 20:41:26.653439839 -0700 @@ -0,0 +1,69 @@ +escape_char / +comment_char % @@ -1046,8 +1266,8 @@ diff -Nrup a/localedata/locales/no_NO b/localedata/locales/no_NO +copy "nb_NO" +END LC_ADDRESS 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 +--- a/localedata/locales/zh_TW 2012-01-01 05:16:32.000000000 -0700 ++++ b/localedata/locales/zh_TW 2012-01-01 20:41:26.653439839 -0700 @@ -1,7 +1,7 @@ comment_char % escape_char / @@ -1076,9 +1296,9 @@ diff -Nrup a/localedata/locales/zh_TW b/localedata/locales/zh_TW date "2000-08-02" % diff -Nrup a/login/programs/pt_chown.c b/login/programs/pt_chown.c ---- a/login/programs/pt_chown.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/login/programs/pt_chown.c 2012-06-07 12:15:21.807318711 -0600 -@@ -28,6 +28,7 @@ +--- a/login/programs/pt_chown.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/login/programs/pt_chown.c 2012-01-01 20:41:26.654439839 -0700 +@@ -29,6 +29,7 @@ #include #include #include @@ -1086,7 +1306,7 @@ diff -Nrup a/login/programs/pt_chown.c b/login/programs/pt_chown.c #ifdef HAVE_LIBCAP # include # include -@@ -142,7 +143,7 @@ main (int argc, char *argv[]) +@@ -143,7 +144,7 @@ main (int argc, char *argv[]) uid_t uid = getuid (); int remaining; @@ -1095,7 +1315,7 @@ diff -Nrup a/login/programs/pt_chown.c b/login/programs/pt_chown.c { #ifdef HAVE_LIBCAP /* Drop privileges. */ -@@ -175,6 +176,13 @@ main (int argc, char *argv[]) +@@ -176,6 +177,13 @@ main (int argc, char *argv[]) /* We aren't going to be using privileges, so drop them right now. */ setuid (uid); @@ -1109,7 +1329,7 @@ diff -Nrup a/login/programs/pt_chown.c b/login/programs/pt_chown.c /* Set locale via LC_ALL. */ setlocale (LC_ALL, ""); -@@ -194,9 +202,5 @@ main (int argc, char *argv[]) +@@ -195,9 +203,5 @@ main (int argc, char *argv[]) return EXIT_FAILURE; } @@ -1119,11 +1339,90 @@ diff -Nrup a/login/programs/pt_chown.c b/login/programs/pt_chown.c - return EXIT_SUCCESS; } +diff -Nrup a/malloc/mcheck.c b/malloc/mcheck.c +--- a/malloc/mcheck.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/malloc/mcheck.c 2012-01-01 20:41:26.654439839 -0700 +@@ -25,10 +25,26 @@ + # include + # include + # include ++# include + # include + # include + #endif + ++#ifdef _LIBC ++extern __typeof (malloc) __libc_malloc; ++extern __typeof (free) __libc_free; ++extern __typeof (realloc) __libc_realloc; ++libc_hidden_proto (__libc_malloc) ++libc_hidden_proto (__libc_realloc) ++libc_hidden_proto (__libc_free) ++libc_hidden_proto (__libc_memalign) ++#else ++# define __libc_malloc(sz) malloc (sz) ++# define __libc_free(ptr) free (ptr) ++# define __libc_realloc(ptr, sz) realloc (ptr, sz) ++# define __libc_memalign(al, sz) memalign (al, sz) ++#endif ++ + /* Old hook values. */ + static void (*old_free_hook) (__ptr_t ptr, __const __ptr_t); + static __ptr_t (*old_malloc_hook) (__malloc_size_t size, const __ptr_t); +@@ -199,7 +215,7 @@ freehook (__ptr_t ptr, const __ptr_t cal + if (old_free_hook != NULL) + (*old_free_hook) (ptr, caller); + else +- free (ptr); ++ __libc_free (ptr); + __free_hook = freehook; + } + +@@ -222,7 +238,7 @@ mallochook (__malloc_size_t size, const + hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1, + caller); + else +- hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1); ++ hdr = (struct hdr *) __libc_malloc (sizeof (struct hdr) + size + 1); + __malloc_hook = mallochook; + if (hdr == NULL) + return NULL; +@@ -259,7 +275,7 @@ memalignhook (__malloc_size_t alignment, + if (old_memalign_hook != NULL) + block = (*old_memalign_hook) (alignment, slop + size + 1, caller); + else +- block = memalign (alignment, slop + size + 1); ++ block = __libc_memalign (alignment, slop + size + 1); + __memalign_hook = memalignhook; + if (block == NULL) + return NULL; +@@ -320,8 +336,8 @@ reallochook (__ptr_t ptr, __malloc_size_ + sizeof (struct hdr) + size + 1, + caller); + else +- hdr = (struct hdr *) realloc ((__ptr_t) hdr, +- sizeof (struct hdr) + size + 1); ++ hdr = (struct hdr *) __libc_realloc ((__ptr_t) hdr, ++ sizeof (struct hdr) + size + 1); + __free_hook = freehook; + __malloc_hook = mallochook; + __memalign_hook = memalignhook; +@@ -381,8 +397,8 @@ mcheck (func) + if (__malloc_initialized <= 0 && !mcheck_used) + { + /* We call malloc() once here to ensure it is initialized. */ +- void *p = malloc (0); +- free (p); ++ void *p = __libc_malloc (0); ++ __libc_free (p); + + old_free_hook = __free_hook; + __free_hook = freehook; diff -Nrup a/manual/libc.texinfo b/manual/libc.texinfo ---- a/manual/libc.texinfo 2012-06-05 07:42:49.000000000 -0600 -+++ b/manual/libc.texinfo 2012-06-07 12:15:21.808318708 -0600 -@@ -7,7 +7,7 @@ - @include macros.texi +--- a/manual/libc.texinfo 2012-01-01 05:16:32.000000000 -0700 ++++ b/manual/libc.texinfo 2012-01-01 20:41:26.655439839 -0700 +@@ -5,7 +5,7 @@ + @c setchapternewpage odd @comment Tell install-info what to do. -@dircategory Software libraries @@ -1132,11 +1431,11 @@ diff -Nrup a/manual/libc.texinfo b/manual/libc.texinfo * Libc: (libc). C library. @end direntry diff -Nrup a/misc/sys/cdefs.h b/misc/sys/cdefs.h ---- a/misc/sys/cdefs.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/misc/sys/cdefs.h 2012-06-07 12:15:21.808318708 -0600 -@@ -142,7 +142,10 @@ +--- a/misc/sys/cdefs.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/misc/sys/cdefs.h 2012-01-01 20:41:26.655439839 -0700 +@@ -146,7 +146,10 @@ + #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) - #define __fortify_function __extern_always_inline __attribute_artificial__ -#if __GNUC_PREREQ (4,3) +#if __GNUC_PREREQ (4,3) \ @@ -1146,19 +1445,26 @@ diff -Nrup a/misc/sys/cdefs.h b/misc/sys/cdefs.h # define __warndecl(name, msg) \ extern void name (void) __attribute__((__warning__ (msg))) # define __warnattr(msg) __attribute__((__warning__ (msg))) -@@ -320,7 +323,10 @@ +@@ -316,10 +319,16 @@ /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used. */ -#if !defined __cplusplus || __GNUC_PREREQ (4,3) +#if !defined __cplusplus || __GNUC_PREREQ (4,3) \ + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \ -+ && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \ -+ && __GNUC_RH_RELEASE__ >= 31) ++ && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \ ++ && __GNUC_RH_RELEASE__ >= 31) # if defined __GNUC_STDC_INLINE__ || defined __cplusplus # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) - # define __extern_always_inline \ -@@ -333,7 +339,10 @@ +-# if __GNUC_PREREQ (4,3) ++# if __GNUC_PREREQ (4,3) \ ++ || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \ ++ && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \ ++ && __GNUC_RH_RELEASE__ >= 31) + # define __extern_always_inline \ + extern __always_inline __attribute__ ((__gnu_inline__, __artificial__)) + # else +@@ -339,7 +348,10 @@ /* GCC 4.3 and above allow passing all anonymous arguments of an __extern_always_inline function to some other vararg function. */ @@ -1171,9 +1477,21 @@ diff -Nrup a/misc/sys/cdefs.h b/misc/sys/cdefs.h # define __va_arg_pack_len() __builtin_va_arg_pack_len () #endif diff -Nrup a/nis/Makefile b/nis/Makefile ---- a/nis/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/nis/Makefile 2012-06-07 12:15:21.810318702 -0600 -@@ -71,6 +71,8 @@ libnss_nisplus-inhibit-o = $(filter-out +--- a/nis/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/nis/Makefile 2012-01-01 20:41:26.656439839 -0700 +@@ -23,9 +23,9 @@ subdir := nis + + aux := nis_hash + ++headers := $(wildcard rpcsvc/*.[hx]) + distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \ +- nisplus-parser.h nis_xdr.h nss \ +- $(wildcard rpcsvc/*.[hx]) ++ nisplus-parser.h nis_xdr.h nss + + # These are the databases available for the nis (and perhaps later nisplus) + # service. This must be a superset of the services in nss. +@@ -69,6 +69,8 @@ libnss_nisplus-inhibit-o = $(filter-out include ../Rules @@ -1183,8 +1501,8 @@ diff -Nrup a/nis/Makefile b/nis/Makefile $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version) $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \ diff -Nrup a/nis/nss b/nis/nss ---- a/nis/nss 2012-06-05 07:42:49.000000000 -0600 -+++ b/nis/nss 2012-06-07 12:15:21.811318698 -0600 +--- a/nis/nss 2012-01-01 05:16:32.000000000 -0700 ++++ b/nis/nss 2012-01-01 20:41:26.656439839 -0700 @@ -25,7 +25,7 @@ # memory with every getXXent() call. Otherwise each getXXent() call # might result into a network communication with the server to get @@ -1195,9 +1513,61 @@ diff -Nrup a/nis/nss b/nis/nss # ADJUNCT_AS_SHADOW # If set to TRUE, the passwd routines in the NIS NSS module will not diff -Nrup a/nptl/ChangeLog b/nptl/ChangeLog ---- a/nptl/ChangeLog 2012-06-05 07:42:49.000000000 -0600 -+++ b/nptl/ChangeLog 2012-06-07 12:15:21.813318690 -0600 -@@ -5562,6 +5562,11 @@ +--- a/nptl/ChangeLog 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/ChangeLog 2012-01-01 20:41:26.659439839 -0700 +@@ -210,6 +210,51 @@ + clearing memory. + Patch partly by Robert Rex . + ++2011-02-22 Rayson Ho ++ ++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap ++ probes for i386. ++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. ++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. ++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise. ++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. ++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. ++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. ++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. ++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. ++ ++2011-02-09 Rayson Ho ++ ++ * DESIGN-systemtap-probes.txt: New file. ++ * pthread_cond_broadcast.c: SystemTap probes. ++ * pthread_cond_init.c: Likewise. ++ * pthread_cond_signal.c: Likewise. ++ * pthread_cond_wait.c: Likewise. ++ * pthread_cond_destroy.c: Likewise. ++ * pthread_create.c: Likewise. ++ * pthread_join.c: Likewise. ++ * pthread_mutex_destroy.c: Likewise. ++ * pthread_mutex_init.c: Likewise. ++ * pthread_mutex_lock.c: Likewise. ++ * pthread_mutex_timedlock.c: Likewise. ++ * pthread_mutex_unlock.c: Likewise. ++ * pthread_rwlock_destroy.c: Likewise. ++ * pthread_rwlock_rdlock.c: Likewise. ++ * pthread_rwlock_unlock.c: Likewise. ++ * pthread_rwlock_wrlock.c: Likewise. ++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. ++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. ++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise. ++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. ++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. ++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. ++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise. ++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. ++ ++2010-07-23 Roland McGrath ++ ++ * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE. ++ + 2011-01-19 Roland McGrath + + * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo. +@@ -4939,6 +4984,11 @@ Move definition inside libpthread, libc, librt check. Provide definition for rtld. @@ -1209,7 +1579,7 @@ diff -Nrup a/nptl/ChangeLog b/nptl/ChangeLog 2004-09-02 Ulrich Drepper * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp. -@@ -7636,6 +7641,11 @@ +@@ -7013,6 +7063,11 @@ * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules). @@ -1221,10 +1591,113 @@ diff -Nrup a/nptl/ChangeLog b/nptl/ChangeLog 2003-07-25 Jakub Jelinek * tst-cancel17.c (do_test): Check if aio_cancel failed. +diff -Nrup a/nptl/DESIGN-systemtap-probes.txt b/nptl/DESIGN-systemtap-probes.txt +--- a/nptl/DESIGN-systemtap-probes.txt 1969-12-31 17:00:00.000000000 -0700 ++++ b/nptl/DESIGN-systemtap-probes.txt 2012-01-01 20:41:26.660439839 -0700 +@@ -0,0 +1,89 @@ ++Systemtap is a dynamic tracing/instrumenting tool available on Linux. Probes ++that are not fired at run time have close to zero overhead. ++ ++The following probes are available for NPTL: ++ ++Thread creation & Join Probes ++============================= ++pthread_create - probe for pthread_create ++ arg1 = pointer (pthread_t*) to thread ++ arg2 = pointer (pthread_attr_t*) to attr ++ arg3 = pointer (void *) to start_routine ++ arg4 = arguments to start_routine ++pthread_start - probe for actual thread creation ++ arg1 = struct pthread (members include thread ID, process ID) ++ arg2 = address of start_routine ++ arg3 = pointer to the list of arguments ++pthread_join - probe for pthread_join ++ arg1 = thread ID ++pthread_join_ret - probe for pthread_join return ++ arg1 = thread ID ++ arg2 = return value ++ ++Lock-related Probes ++=================== ++mutex_init - probe for pthread_mutex_init ++ arg1 = address of mutex lock ++mutex_acquired - probe for succ. return of pthread_mutex_lock ++ arg1 = address of mutex lock ++mutex_timedlock_acquired - probe for succ. return of pthread_mutex_timedlock ++ arg1 = address of mutex lock ++mutex_entry - probe for entry to the pthread_mutex_lock function ++ arg1 = address of mutex lock ++mutex_timedlock_entry - probe for entry to the pthread_mutex_timedlock function ++ arg1 = address of mutex lock, arg2 = address of timespec ++mutex_release - probe for pthread_mutex_unlock after the successful release of a ++ mutex lock ++ arg1 = address of mutex lock ++mutex_destroy - probe for pthread_mutex_destroy ++ arg1 = address of mutex lock ++ ++wrlock_entry - probe for entry to the pthread_rwlock_wrlock function ++ arg1 = address of rw lock ++rdlock_entry - probe for entry to the pthread_rwlock_rdlock function ++ arg1 = address of rw lock ++ ++rwlock_destroy - probe for pthread_rwlock_destroy ++ arg1 = address of rw lock ++wrlock_acquire_write - probe for pthread_rwlock_wrlock (after getting the lock) ++ arg1 = address of rw lock ++rdlock_acquire_read - probe for pthread_rwlock_rdlock after successfully getting ++ the lock ++ arg1 = address of rw lock ++rwlock_unlock - probe for pthread_rwlock_unlock ++ arg1 = address of rw lock ++ ++lll_lock_wait - probe in low-level (assembly language) locking code, only fired ++ when futex/FUTEX_WAIT is called (i.e. when trying to acquire a ++ contented lock) ++ arg1 = pointer to futex ++ arg2 = flags passed to the futex system call ++lll_lock_wait_private - probe in low-level (assembly language) locking code, ++ only fired when futex/FUTEX_WAIT is called (i.e. when ++ trying to acquire a contented lock) ++ arg1 = pointer to futex ++ ++lll_futex_wake - probe in low-level (assembly language) locking code, only fired ++ when futex (FUTEX_WAKE) is called ++ arg1 = pointer to futex ++ arg2 = number of processes to wake ++ arg3 = additional flags ++ ++Condition variable Probes ++========================= ++cond_init - probe for pthread_cond_init ++ arg1 = condition ++ arg2 = attr ++cond_destroy - probe for pthread_cond_destroy ++ arg1 = cond ++cond_wait - probe for pthread_cond_wait ++ arg1 = condition ++ arg2 = mutex lock ++cond_timedwait - probe for pthread_cond_timedwait ++ arg1 = condition ++ arg2 = mutex lock ++ arg3 = timespec ++cond_signal - probe for pthread_cond_signal ++ arg1 = condition ++cond_broadcast - probe for pthread_cond_broadcast ++ arg1 = condition 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), \ +--- a/nptl/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/Makefile 2012-01-01 20:41:26.660439839 -0700 +@@ -342,7 +342,8 @@ endif + extra-objs += $(crti-objs) $(crtn-objs) + omit-deps += crti crtn + +-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) ++CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \ ++ -fno-asynchronous-unwind-tables + endif + + CFLAGS-flockfile.c = -D_IO_MTSAFE_IO +@@ -529,15 +530,19 @@ $(addprefix $(objpfx), \ $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \ $(objpfx)libpthread_nonshared.a $(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so @@ -1247,8 +1720,8 @@ diff -Nrup a/nptl/Makefile b/nptl/Makefile $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a endif diff -Nrup a/nptl/Versions b/nptl/Versions ---- a/nptl/Versions 2012-06-05 07:42:49.000000000 -0600 -+++ b/nptl/Versions 2012-06-07 12:15:21.817318674 -0600 +--- a/nptl/Versions 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/Versions 2012-01-01 20:41:26.661439839 -0700 @@ -30,6 +30,7 @@ libc { __libc_alloca_cutoff; # Internal libc interface to libpthread @@ -1258,9 +1731,9 @@ diff -Nrup a/nptl/Versions b/nptl/Versions } diff -Nrup a/nptl/nptl-init.c b/nptl/nptl-init.c ---- a/nptl/nptl-init.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/nptl/nptl-init.c 2012-06-07 12:15:21.817318674 -0600 -@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (v +--- a/nptl/nptl-init.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/nptl-init.c 2012-01-01 20:41:26.661439839 -0700 +@@ -415,7 +415,7 @@ __pthread_initialize_minimal_internal (v /* Determine the default allowed stack size. This is the size used in case the user does not specify one. */ struct rlimit limit; @@ -1269,10 +1742,439 @@ diff -Nrup a/nptl/nptl-init.c b/nptl/nptl-init.c || limit.rlim_cur == RLIM_INFINITY) /* The system limit is not usable. Use an architecture-specific default. */ +diff -Nrup a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c +--- a/nptl/pthread_cond_broadcast.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_cond_broadcast.c 2012-01-01 20:41:26.662439839 -0700 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -32,6 +33,8 @@ int + __pthread_cond_broadcast (cond) + pthread_cond_t *cond; + { ++ LIBC_PROBE (cond_broadcast, 1, cond); ++ + int pshared = (cond->__data.__mutex == (void *) ~0l) + ? LLL_SHARED : LLL_PRIVATE; + /* Make sure we are alone. */ +diff -Nrup a/nptl/pthread_cond_destroy.c b/nptl/pthread_cond_destroy.c +--- a/nptl/pthread_cond_destroy.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_cond_destroy.c 2012-01-01 20:41:26.662439839 -0700 +@@ -20,6 +20,7 @@ + #include + #include + #include "pthreadP.h" ++#include + + + int +@@ -29,6 +30,8 @@ __pthread_cond_destroy (cond) + int pshared = (cond->__data.__mutex == (void *) ~0l) + ? LLL_SHARED : LLL_PRIVATE; + ++ LIBC_PROBE (cond_destroy, 1, cond); ++ + /* Make sure we are alone. */ + lll_lock (cond->__data.__lock, pshared); + +diff -Nrup a/nptl/pthread_cond_init.c b/nptl/pthread_cond_init.c +--- a/nptl/pthread_cond_init.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_cond_init.c 2012-01-01 20:41:26.662439839 -0700 +@@ -20,6 +20,7 @@ + + #include + #include "pthreadP.h" ++#include + + + int +@@ -42,6 +43,8 @@ __pthread_cond_init (cond, cond_attr) + ? NULL : (void *) ~0l); + cond->__data.__broadcast_seq = 0; + ++ LIBC_PROBE (cond_init, 2, cond, cond_attr); ++ + return 0; + } + versioned_symbol (libpthread, __pthread_cond_init, +diff -Nrup a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c +--- a/nptl/pthread_cond_signal.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_cond_signal.c 2012-01-01 20:41:26.663439839 -0700 +@@ -26,6 +26,7 @@ + + #include + #include ++#include + + + int +@@ -35,6 +36,8 @@ __pthread_cond_signal (cond) + int pshared = (cond->__data.__mutex == (void *) ~0l) + ? LLL_SHARED : LLL_PRIVATE; + ++ LIBC_PROBE (cond_signal, 1, cond); ++ + /* Make sure we are alone. */ + lll_lock (cond->__data.__lock, pshared); + +diff -Nrup a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c +--- a/nptl/pthread_cond_wait.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_cond_wait.c 2012-01-01 20:41:26.663439839 -0700 +@@ -25,6 +25,7 @@ + #include + + #include ++#include + + + struct _condvar_cleanup_buffer +@@ -101,6 +102,8 @@ __pthread_cond_wait (cond, mutex) + int pshared = (cond->__data.__mutex == (void *) ~0l) + ? LLL_SHARED : LLL_PRIVATE; + ++ LIBC_PROBE (cond_wait, 2, cond, mutex); ++ + /* Make sure we are alone. */ + lll_lock (cond->__data.__lock, pshared); + +diff -Nrup a/nptl/pthread_create.c b/nptl/pthread_create.c +--- a/nptl/pthread_create.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_create.c 2012-01-01 20:41:26.664439838 -0700 +@@ -32,6 +32,8 @@ + + #include + ++#include ++ + + /* Local function to start thread and handle cleanup. */ + static int start_thread (void *arg); +@@ -300,6 +302,8 @@ start_thread (void *arg) + CANCEL_RESET (oldtype); + } + ++ LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg); ++ + /* Run the code the user provided. */ + #ifdef CALL_THREAD_FCT + THREAD_SETMEM (pd, result, CALL_THREAD_FCT (pd)); +@@ -557,6 +561,8 @@ __pthread_create_2_1 (newthread, attr, s + /* Pass the descriptor to the caller. */ + *newthread = (pthread_t) pd; + ++ LIBC_PROBE (pthread_create, 4, newthread, attr, start_routine, arg); ++ + /* Start the thread. */ + return create_thread (pd, iattr, STACK_VARIABLES_ARGS); + } +diff -Nrup a/nptl/pthread_join.c b/nptl/pthread_join.c +--- a/nptl/pthread_join.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_join.c 2012-01-01 20:41:26.664439838 -0700 +@@ -23,6 +23,8 @@ + #include + #include "pthreadP.h" + ++#include ++ + + static void + cleanup (void *arg) +@@ -55,6 +57,8 @@ pthread_join (threadid, thread_return) + struct pthread *self = THREAD_SELF; + int result = 0; + ++ LIBC_PROBE (pthread_join, 1, threadid); ++ + /* During the wait we change to asynchronous cancellation. If we + are canceled the thread we are waiting for must be marked as + un-wait-ed for again. */ +@@ -110,5 +114,7 @@ pthread_join (threadid, thread_return) + __free_tcb (pd); + } + ++ LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd->result); ++ + return result; + } +diff -Nrup a/nptl/pthread_mutex_destroy.c b/nptl/pthread_mutex_destroy.c +--- a/nptl/pthread_mutex_destroy.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_mutex_destroy.c 2012-01-01 20:41:26.665439837 -0700 +@@ -20,11 +20,15 @@ + #include + #include "pthreadP.h" + ++#include ++ + + int + __pthread_mutex_destroy (mutex) + pthread_mutex_t *mutex; + { ++ LIBC_PROBE (mutex_destroy, 1, mutex); ++ + if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 + && mutex->__data.__nusers != 0) + return EBUSY; +diff -Nrup a/nptl/pthread_mutex_init.c b/nptl/pthread_mutex_init.c +--- a/nptl/pthread_mutex_init.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_mutex_init.c 2012-01-01 20:41:26.665439837 -0700 +@@ -24,6 +24,8 @@ + #include + #include "pthreadP.h" + ++#include ++ + static const struct pthread_mutexattr default_attr = + { + /* Default is a normal mutex, not shared between processes. */ +@@ -135,6 +137,8 @@ __pthread_mutex_init (mutex, mutexattr) + // mutex->__spins = 0; already done by memset + // mutex->__next = NULL; already done by memset + ++ LIBC_PROBE (mutex_init, 1, mutex); ++ + return 0; + } + strong_alias (__pthread_mutex_init, pthread_mutex_init) +diff -Nrup a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c +--- a/nptl/pthread_mutex_lock.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_mutex_lock.c 2012-01-01 20:41:26.665439837 -0700 +@@ -24,6 +24,7 @@ + #include + #include "pthreadP.h" + #include ++#include + + + #ifndef LLL_MUTEX_LOCK +@@ -48,6 +49,9 @@ __pthread_mutex_lock (mutex) + assert (sizeof (mutex->__size) >= sizeof (mutex->__data)); + + unsigned int type = PTHREAD_MUTEX_TYPE (mutex); ++ ++ LIBC_PROBE (mutex_entry, 1, mutex); ++ + if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0)) + return __pthread_mutex_lock_full (mutex); + +@@ -127,6 +131,8 @@ __pthread_mutex_lock (mutex) + ++mutex->__data.__nusers; + #endif + ++ LIBC_PROBE (mutex_acquired, 1, mutex); ++ + return 0; + } + +@@ -467,6 +473,8 @@ __pthread_mutex_lock_full (pthread_mutex + ++mutex->__data.__nusers; + #endif + ++ LIBC_PROBE (mutex_acquired, 1, mutex); ++ + return 0; + } + #ifndef __pthread_mutex_lock +diff -Nrup a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c +--- a/nptl/pthread_mutex_timedlock.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_mutex_timedlock.c 2012-01-01 20:41:26.666439837 -0700 +@@ -24,6 +24,8 @@ + #include + #include + ++#include ++ + + int + pthread_mutex_timedlock (mutex, abstime) +@@ -34,6 +36,8 @@ pthread_mutex_timedlock (mutex, abstime) + pid_t id = THREAD_GETMEM (THREAD_SELF, tid); + int result = 0; + ++ LIBC_PROBE (mutex_timedlock_entry, 2, mutex, abstime); ++ + /* We must not check ABSTIME here. If the thread does not block + abstime must not be checked for a valid value. */ + +@@ -172,6 +176,8 @@ pthread_mutex_timedlock (mutex, abstime) + + ++mutex->__data.__count; + ++ LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); ++ + return 0; + } + } +@@ -242,6 +248,8 @@ pthread_mutex_timedlock (mutex, abstime) + + ++mutex->__data.__count; + ++ LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); ++ + return 0; + } + } +@@ -377,6 +385,8 @@ pthread_mutex_timedlock (mutex, abstime) + + ++mutex->__data.__count; + ++ LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); ++ + return 0; + } + } +@@ -477,6 +487,8 @@ pthread_mutex_timedlock (mutex, abstime) + /* Record the ownership. */ + mutex->__data.__owner = id; + ++mutex->__data.__nusers; ++ ++ LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); + } + + out: +diff -Nrup a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c +--- a/nptl/pthread_mutex_unlock.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_mutex_unlock.c 2012-01-01 20:41:26.666439837 -0700 +@@ -22,6 +22,7 @@ + #include + #include "pthreadP.h" + #include ++#include + + static int + internal_function +@@ -50,6 +51,9 @@ __pthread_mutex_unlock_usercnt (mutex, d + + /* Unlock. */ + lll_unlock (mutex->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)); ++ ++ LIBC_PROBE (mutex_release, 1, mutex); ++ + return 0; + } + else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1)) +@@ -272,6 +276,9 @@ __pthread_mutex_unlock_full (pthread_mut + PTHREAD_MUTEX_PSHARED (mutex)); + + int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; ++ ++ LIBC_PROBE (mutex_release, 1, mutex); ++ + return __pthread_tpp_change_priority (oldprio, -1); + + default: +@@ -279,6 +286,7 @@ __pthread_mutex_unlock_full (pthread_mut + return EINVAL; + } + ++ LIBC_PROBE (mutex_release, 1, mutex); + return 0; + } + +diff -Nrup a/nptl/pthread_rwlock_destroy.c b/nptl/pthread_rwlock_destroy.c +--- a/nptl/pthread_rwlock_destroy.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_rwlock_destroy.c 2012-01-01 20:41:26.667439837 -0700 +@@ -18,12 +18,15 @@ + 02111-1307 USA. */ + + #include "pthreadP.h" ++#include + + + int + __pthread_rwlock_destroy (rwlock) + pthread_rwlock_t *rwlock; + { ++ LIBC_PROBE (rwlock_destroy, 1, rwlock); ++ + /* Nothing to be done. For now. */ + return 0; + } +diff -Nrup a/nptl/pthread_rwlock_rdlock.c b/nptl/pthread_rwlock_rdlock.c +--- a/nptl/pthread_rwlock_rdlock.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_rwlock_rdlock.c 2012-01-01 20:41:26.667439837 -0700 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* Acquire read lock for RWLOCK. */ +@@ -31,6 +32,8 @@ __pthread_rwlock_rdlock (rwlock) + { + int result = 0; + ++ LIBC_PROBE (rdlock_entry, 1, rwlock); ++ + /* Make sure we are alone. */ + lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); + +@@ -49,6 +52,8 @@ __pthread_rwlock_rdlock (rwlock) + --rwlock->__data.__nr_readers; + result = EAGAIN; + } ++ else ++ LIBC_PROBE (rdlock_acquire_read, 1, rwlock); + + break; + } +diff -Nrup a/nptl/pthread_rwlock_unlock.c b/nptl/pthread_rwlock_unlock.c +--- a/nptl/pthread_rwlock_unlock.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_rwlock_unlock.c 2012-01-01 20:41:26.668439837 -0700 +@@ -22,11 +22,14 @@ + #include + #include + #include ++#include + + /* Unlock RWLOCK. */ + int + __pthread_rwlock_unlock (pthread_rwlock_t *rwlock) + { ++ LIBC_PROBE (rwlock_unlock, 1, rwlock); ++ + lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); + if (rwlock->__data.__writer) + rwlock->__data.__writer = 0; +diff -Nrup a/nptl/pthread_rwlock_wrlock.c b/nptl/pthread_rwlock_wrlock.c +--- a/nptl/pthread_rwlock_wrlock.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/pthread_rwlock_wrlock.c 2012-01-01 20:41:26.668439837 -0700 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* Acquire write lock for RWLOCK. */ +@@ -31,6 +32,8 @@ __pthread_rwlock_wrlock (rwlock) + { + int result = 0; + ++ LIBC_PROBE (wrlock_entry, 1, rwlock); ++ + /* Make sure we are alone. */ + lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); + +@@ -41,6 +44,8 @@ __pthread_rwlock_wrlock (rwlock) + { + /* Mark self as writer. */ + rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid); ++ ++ LIBC_PROBE (wrlock_acquire_write, 1, rwlock); + break; + } + diff -Nrup a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h ---- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-07 12:15:21.817318674 -0600 -@@ -188,4 +188,7 @@ +--- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-01-01 20:41:26.668439837 -0700 +@@ -189,4 +189,7 @@ /* Typed memory objects are not available. */ #define _POSIX_TYPED_MEMORY_OBJECTS -1 @@ -1282,7 +2184,7 @@ diff -Nrup a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/s #endif /* bits/posix_opt.h */ diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/Versions b/nptl/sysdeps/unix/sysv/linux/i386/Versions --- a/nptl/sysdeps/unix/sysv/linux/i386/Versions 1969-12-31 17:00:00.000000000 -0700 -+++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions 2012-06-07 12:15:21.818318670 -0600 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions 2012-01-01 20:41:26.669439837 -0700 @@ -0,0 +1,6 @@ +libc { + GLIBC_PRIVATE { @@ -1290,10 +2192,174 @@ diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/Versions b/nptl/sysdeps/unix/sysv + __uname; + } +} +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2012-01-01 20:41:26.669439837 -0700 +@@ -22,6 +22,8 @@ + #include + #include + ++#include ++ + .text + + #ifdef __ASSUME_PRIVATE_FUTEX +@@ -91,7 +93,8 @@ __lll_lock_wait_private: + cmpl %edx, %eax /* NB: %edx == 2 */ + jne 2f + +-1: movl $SYS_futex, %eax ++1: LIBC_PROBE (lll_lock_wait_private, 1, %ebx) ++ movl $SYS_futex, %eax + ENTER_KERNEL + + 2: movl %edx, %eax +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S +--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S 2012-01-01 20:41:26.670439837 -0700 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + .text + +@@ -49,6 +50,8 @@ __pthread_cond_broadcast: + + movl 20(%esp), %ebx + ++ LIBC_PROBE (cond_broadcast, 1, %edx) ++ + /* Get internal lock. */ + movl $1, %edx + xorl %eax, %eax +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S 2012-01-01 20:41:26.670439837 -0700 +@@ -24,7 +24,7 @@ + #include + #include + #include +- ++#include + + .text + +@@ -45,6 +45,8 @@ __pthread_cond_signal: + + movl 12(%esp), %edi + ++ LIBC_PROBE (cond_signal, 1, %edi) ++ + /* Get internal lock. */ + movl $1, %edx + xorl %eax, %eax +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2012-01-01 20:41:26.670439837 -0700 +@@ -24,7 +24,7 @@ + #include + #include + #include +- ++#include + + .text + +@@ -61,6 +61,8 @@ __pthread_cond_timedwait: + movl 20(%esp), %ebx + movl 28(%esp), %ebp + ++ LIBC_PROBE (cond_timedwait, 3, %ebx, 24(%esp), %ebp) ++ + cmpl $1000000000, 4(%ebp) + movl $EINVAL, %eax + jae 18f +diff -Nrup 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-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-01-01 20:41:26.671439837 -0700 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + + .text +@@ -61,6 +62,8 @@ __pthread_cond_wait: + xorl %esi, %esi + movl 20(%esp), %ebx + ++ LIBC_PROBE (cond_wait, 2, 24(%esp), %ebx) ++ + /* Get internal lock. */ + movl $1, %edx + xorl %eax, %eax +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S +--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S 2012-01-01 20:41:26.671439837 -0700 +@@ -23,6 +23,7 @@ + #include + #include + ++#include + + .text + +@@ -41,6 +42,8 @@ __pthread_rwlock_rdlock: + xorl %esi, %esi + movl 12(%esp), %ebx + ++ LIBC_PROBE (rdlock_entry, 1, %ebx) ++ + /* Get the lock. */ + movl $1, %edx + xorl %eax, %eax +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S +--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S 2012-01-01 20:41:26.672439837 -0700 +@@ -23,6 +23,7 @@ + #include + #include + ++#include + + .text + +@@ -41,6 +42,8 @@ __pthread_rwlock_wrlock: + xorl %esi, %esi + movl 12(%esp), %ebx + ++ LIBC_PROBE (wrlock_entry, 1, %ebx) ++ + /* Get the lock. */ + movl $1, %edx + xorl %eax, %eax +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +--- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2012-01-01 20:41:26.672439837 -0700 +@@ -20,6 +20,8 @@ + #ifndef _LOWLEVELLOCK_H + #define _LOWLEVELLOCK_H 1 + ++#include ++ + #ifndef __ASSEMBLER__ + # include + # include +@@ -226,6 +228,7 @@ LLL_STUB_UNWIND_INFO_END + do { \ + int __ignore; \ + register __typeof (nr) _nr asm ("edx") = (nr); \ ++ LIBC_PROBE (lll_futex_wake, 3, futex, nr, private); \ + __asm __volatile (LLL_EBX_LOAD \ + LLL_ENTER_KERNEL \ + LLL_EBX_LOAD \ diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/smp.h b/nptl/sysdeps/unix/sysv/linux/i386/smp.h ---- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-06-07 12:15:21.818318670 -0600 -@@ -36,7 +36,7 @@ is_smp_system (void) +--- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-01-01 20:41:26.673439836 -0700 +@@ -37,7 +37,7 @@ is_smp_system (void) char *cp; /* Try reading the number using `sysctl' first. */ @@ -1304,7 +2370,7 @@ diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/smp.h b/nptl/sysdeps/unix/sysv/li { diff -Nrup a/nptl/sysdeps/unix/sysv/linux/kernel-features.h b/nptl/sysdeps/unix/sysv/linux/kernel-features.h --- a/nptl/sysdeps/unix/sysv/linux/kernel-features.h 1969-12-31 17:00:00.000000000 -0700 -+++ b/nptl/sysdeps/unix/sysv/linux/kernel-features.h 2012-06-07 12:15:21.818318670 -0600 ++++ b/nptl/sysdeps/unix/sysv/linux/kernel-features.h 2012-01-01 20:41:26.673439836 -0700 @@ -0,0 +1,6 @@ +#include_next + @@ -1312,9 +2378,186 @@ diff -Nrup a/nptl/sysdeps/unix/sysv/linux/kernel-features.h b/nptl/sysdeps/unix/ +#ifndef __ASSUME_CLONE_THREAD_FLAGS +# define __ASSUME_CLONE_THREAD_FLAGS 1 +#endif +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2012-01-01 20:41:26.673439836 -0700 +@@ -22,6 +22,8 @@ + #include + #include + ++#include ++ + .text + + #ifdef __ASSUME_PRIVATE_FUTEX +@@ -87,7 +89,8 @@ __lll_lock_wait_private: + cmpl %edx, %eax /* NB: %edx == 2 */ + jne 2f + +-1: movl $SYS_futex, %eax ++1: LIBC_PROBE (lll_lock_wait_private, 1, %rdi) ++ movl $SYS_futex, %eax + syscall + + 2: movl %edx, %eax +@@ -126,7 +129,8 @@ __lll_lock_wait: + cmpl %edx, %eax /* NB: %edx == 2 */ + jne 2f + +-1: movl $SYS_futex, %eax ++1: LIBC_PROBE (lll_lock_wait, 2, %rdi, %rsi) ++ movl $SYS_futex, %eax + syscall + + 2: movl %edx, %eax +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2012-01-01 20:41:26.674439835 -0700 +@@ -20,6 +20,8 @@ + #ifndef _LOWLEVELLOCK_H + #define _LOWLEVELLOCK_H 1 + ++#include ++ + #ifndef __ASSEMBLER__ + # include + # include +@@ -227,6 +229,7 @@ LLL_STUB_UNWIND_INFO_END + do { \ + int __ignore; \ + register __typeof (nr) _nr __asm ("edx") = (nr); \ ++ LIBC_PROBE (lll_futex_wake, 3, futex, nr, private); \ + __asm __volatile ("syscall" \ + : "=a" (__ignore) \ + : "0" (SYS_futex), "D" (futex), \ +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S +--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S 2012-01-01 20:41:26.674439835 -0700 +@@ -25,7 +25,7 @@ + #include + #include + #include +- ++#include + + .text + +@@ -35,6 +35,8 @@ + .align 16 + __pthread_cond_broadcast: + ++ LIBC_PROBE (cond_broadcast, 1, %rdi) ++ + /* Get internal lock. */ + movl $1, %esi + xorl %eax, %eax +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S +--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S 2012-01-01 20:41:26.675439835 -0700 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + + .text +@@ -34,6 +35,8 @@ + .align 16 + __pthread_cond_signal: + ++ LIBC_PROBE (cond_signal, 1, %rdi) ++ + /* Get internal lock. */ + movq %rdi, %r8 + movl $1, %esi +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 2012-01-01 20:41:26.675439835 -0700 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include + +@@ -68,6 +69,8 @@ __pthread_cond_timedwait: + cfi_adjust_cfa_offset(FRAME_SIZE) + cfi_remember_state + ++ LIBC_PROBE (cond_timedwait, 3, %rdi, %rsi, %rdx) ++ + cmpq $1000000000, 8(%rdx) + movl $EINVAL, %eax + jae 48f +diff -Nrup 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-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-01-01 20:41:26.676439836 -0700 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include + +@@ -66,6 +67,8 @@ __pthread_cond_wait: + +--------------------------+ + */ + ++ LIBC_PROBE (cond_wait, 2, %rdi, %rsi) ++ + cmpq $-1, dep_mutex(%rdi) + + /* Prepare structure passed to cancellation handler. */ +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S +--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S 2012-01-01 20:41:26.677439836 -0700 +@@ -22,7 +22,7 @@ + #include + #include + #include +- ++#include + + .text + +@@ -31,6 +31,9 @@ + .align 16 + __pthread_rwlock_rdlock: + cfi_startproc ++ ++ LIBC_PROBE (rdlock_entry, 1, %rdi) ++ + xorq %r10, %r10 + + /* Get the lock. */ +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S +--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S 2012-01-01 20:41:26.677439836 -0700 +@@ -22,7 +22,7 @@ + #include + #include + #include +- ++#include + + .text + +@@ -31,6 +31,9 @@ + .align 16 + __pthread_rwlock_wrlock: + cfi_startproc ++ ++ LIBC_PROBE (wrlock_entry, 1, %rdi) ++ + xorq %r10, %r10 + + /* Get the lock. */ 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 +--- a/nscd/nscd.conf 2012-01-01 05:16:32.000000000 -0700 ++++ b/nscd/nscd.conf 2012-01-01 20:41:26.677439836 -0700 @@ -33,7 +33,7 @@ # logfile /var/log/nscd.log # threads 4 @@ -1325,8 +2568,8 @@ diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf debug-level 0 # reload-count 5 diff -Nrup a/nscd/nscd.init b/nscd/nscd.init ---- a/nscd/nscd.init 2012-06-05 07:42:49.000000000 -0600 -+++ b/nscd/nscd.init 2012-06-07 12:15:21.818318670 -0600 +--- a/nscd/nscd.init 2012-01-01 05:16:32.000000000 -0700 ++++ b/nscd/nscd.init 2012-01-01 20:41:26.678439836 -0700 @@ -9,6 +9,7 @@ # slow naming services like NIS, NIS+, LDAP, or hesiod. # processname: /usr/sbin/nscd @@ -1404,9 +2647,9 @@ diff -Nrup a/nscd/nscd.init b/nscd/nscd.init *) echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" diff -Nrup a/nscd/selinux.c b/nscd/selinux.c ---- a/nscd/selinux.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/nscd/selinux.c 2012-06-07 12:15:21.819318667 -0600 -@@ -269,6 +269,18 @@ avc_create_thread (void (*run) (void)) +--- a/nscd/selinux.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nscd/selinux.c 2012-01-01 20:41:26.678439836 -0700 +@@ -270,6 +270,18 @@ avc_create_thread (void (*run) (void)) { int rc; @@ -1426,20 +2669,20 @@ diff -Nrup a/nscd/selinux.c b/nscd/selinux.c pthread_create (&avc_notify_thread, NULL, (void *(*) (void *)) run, NULL); if (rc != 0) diff -Nrup a/nss/Makefile b/nss/Makefile ---- a/nss/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/nss/Makefile 2012-06-07 12:15:21.819318667 -0600 -@@ -101,6 +101,7 @@ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpf - echo '#include "$<"') > $@.new - mv -f $@.new $@ +--- a/nss/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/nss/Makefile 2012-01-01 20:41:26.679439836 -0700 +@@ -88,6 +88,7 @@ endif + + include ../Rules +CFLAGS-files-hosts.c += -fno-strict-aliasing - $(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o) - + ifeq (yes,$(build-static-nss)) + $(objpfx)getent: $(objpfx)libnss_files.a diff -Nrup a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c ---- a/nss/nss_files/files-XXX.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/nss/nss_files/files-XXX.c 2012-06-07 12:15:21.819318667 -0600 -@@ -189,7 +189,7 @@ internal_getent (struct STRUCTURE *resul +--- a/nss/nss_files/files-XXX.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/nss/nss_files/files-XXX.c 2012-01-01 20:41:26.679439836 -0700 +@@ -190,7 +190,7 @@ internal_getent (struct STRUCTURE *resul { char *p; struct parser_data *data = (void *) buffer; @@ -1449,9 +2692,9 @@ diff -Nrup a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c if (buflen < sizeof *data + 2) diff -Nrup a/posix/Makefile b/posix/Makefile ---- a/posix/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/posix/Makefile 2012-06-07 12:15:21.820318664 -0600 -@@ -305,15 +305,8 @@ $(inst_libexecdir)/getconf: $(inst_bindi +--- a/posix/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/posix/Makefile 2012-01-01 20:41:26.680439836 -0700 +@@ -320,15 +320,8 @@ $(inst_libexecdir)/getconf: $(inst_bindi mv -f $@/$$spec.new $@/$$spec; \ done < $(objpfx)getconf.speclist @@ -1472,8 +2715,8 @@ diff -Nrup a/posix/Makefile b/posix/Makefile + > $@.new mv -f $@.new $@ diff -Nrup a/posix/gai.conf b/posix/gai.conf ---- a/posix/gai.conf 2012-06-05 07:42:49.000000000 -0600 -+++ b/posix/gai.conf 2012-06-07 12:15:21.820318664 -0600 +--- a/posix/gai.conf 2012-01-01 05:16:32.000000000 -0700 ++++ b/posix/gai.conf 2012-01-01 20:41:26.680439836 -0700 @@ -41,7 +41,7 @@ # # precedence @@ -1500,7 +2743,7 @@ diff -Nrup a/posix/gai.conf b/posix/gai.conf +# This is what the Red Hat setting currently uses. diff -Nrup a/posix/getconf.speclist.h b/posix/getconf.speclist.h --- a/posix/getconf.speclist.h 1969-12-31 17:00:00.000000000 -0700 -+++ b/posix/getconf.speclist.h 2012-06-07 12:15:21.820318664 -0600 ++++ b/posix/getconf.speclist.h 2012-01-01 20:41:26.680439836 -0700 @@ -0,0 +1,39 @@ +#include +const char *START_OF_STRINGS = @@ -1542,9 +2785,9 @@ diff -Nrup a/posix/getconf.speclist.h b/posix/getconf.speclist.h +#endif +""; diff -Nrup a/posix/regcomp.c b/posix/regcomp.c ---- a/posix/regcomp.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/posix/regcomp.c 2012-06-07 12:15:21.821318661 -0600 -@@ -2772,40 +2772,29 @@ parse_bracket_exp (re_string_t *regexp, +--- a/posix/regcomp.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/posix/regcomp.c 2012-01-01 20:41:26.681439836 -0700 +@@ -2745,40 +2745,29 @@ parse_bracket_exp (re_string_t *regexp, /* Local function for parse_bracket_exp used in _LIBC environement. Seek the collating symbol entry correspondings to NAME. @@ -1603,7 +2846,7 @@ diff -Nrup a/posix/regcomp.c b/posix/regcomp.c } /* Local function for parse_bracket_exp used in _LIBC environment. -@@ -2814,8 +2803,7 @@ parse_bracket_exp (re_string_t *regexp, +@@ -2787,8 +2776,7 @@ parse_bracket_exp (re_string_t *regexp, auto inline unsigned int __attribute ((always_inline)) @@ -1613,7 +2856,7 @@ diff -Nrup a/posix/regcomp.c b/posix/regcomp.c { if (br_elem->type == SB_CHAR) { -@@ -2843,7 +2831,7 @@ parse_bracket_exp (re_string_t *regexp, +@@ -2816,7 +2804,7 @@ parse_bracket_exp (re_string_t *regexp, int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); @@ -1622,7 +2865,7 @@ diff -Nrup a/posix/regcomp.c b/posix/regcomp.c { /* We found the entry. */ idx = symb_table[2 * elem + 1]; -@@ -2861,7 +2849,7 @@ parse_bracket_exp (re_string_t *regexp, +@@ -2834,7 +2822,7 @@ parse_bracket_exp (re_string_t *regexp, /* Return the collation sequence value. */ return *(unsigned int *) (extra + idx); } @@ -1631,7 +2874,7 @@ diff -Nrup a/posix/regcomp.c b/posix/regcomp.c { /* No valid character. Match it as a single byte character. */ -@@ -2883,11 +2871,8 @@ parse_bracket_exp (re_string_t *regexp, +@@ -2856,11 +2844,8 @@ parse_bracket_exp (re_string_t *regexp, auto inline reg_errcode_t __attribute ((always_inline)) @@ -1645,7 +2888,7 @@ diff -Nrup a/posix/regcomp.c b/posix/regcomp.c { unsigned int ch; uint32_t start_collseq; -@@ -2966,25 +2951,22 @@ parse_bracket_exp (re_string_t *regexp, +@@ -2939,25 +2924,22 @@ parse_bracket_exp (re_string_t *regexp, auto inline reg_errcode_t __attribute ((always_inline)) @@ -1676,9 +2919,9 @@ diff -Nrup a/posix/regcomp.c b/posix/regcomp.c /* No valid character, treat it as a normal character. */ diff -Nrup a/resolv/Makefile b/resolv/Makefile ---- a/resolv/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/resolv/Makefile 2012-06-07 12:15:21.822318657 -0600 -@@ -80,6 +80,7 @@ ifeq (yes,$(have-ssp)) +--- a/resolv/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/resolv/Makefile 2012-01-01 20:41:26.682439836 -0700 +@@ -81,6 +81,7 @@ ifeq (yes,$(have-ssp)) CFLAGS-libresolv += -fstack-protector endif CFLAGS-res_hconf.c = -fexceptions @@ -1687,9 +2930,9 @@ diff -Nrup a/resolv/Makefile b/resolv/Makefile # The BIND code elicits some harmless warnings. +cflags += -Wno-strict-prototypes -Wno-write-strings diff -Nrup a/resource/getrlimit.c b/resource/getrlimit.c ---- a/resource/getrlimit.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/resource/getrlimit.c 2012-06-07 12:15:21.823318653 -0600 -@@ -27,6 +27,7 @@ __getrlimit (enum __rlimit_resource reso +--- a/resource/getrlimit.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/resource/getrlimit.c 2012-01-01 20:41:26.682439836 -0700 +@@ -28,6 +28,7 @@ __getrlimit (enum __rlimit_resource reso __set_errno (ENOSYS); return -1; } @@ -1698,9 +2941,9 @@ diff -Nrup a/resource/getrlimit.c b/resource/getrlimit.c stub_warning (getrlimit) diff -Nrup a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c ---- a/stdio-common/vfprintf.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/stdio-common/vfprintf.c 2012-06-07 12:15:21.823318653 -0600 -@@ -1168,42 +1168,9 @@ vfprintf (FILE *s, const CHAR_T *format, +--- a/stdio-common/vfprintf.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/stdio-common/vfprintf.c 2012-01-01 20:41:26.683439836 -0700 +@@ -1161,41 +1161,9 @@ vfprintf (FILE *s, const CHAR_T *format, else if (!is_long && spec != L_('S')) \ { \ if (prec != -1) \ @@ -1729,7 +2972,6 @@ diff -Nrup a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c - if (__mbsnrtowcs (ignore, &str2, strend - str2, \ - ignore_size, &ps) == (size_t) -1) \ - { \ -- /* Conversion function has set errno. */ \ - done = -1; \ - goto all_done; \ - } \ @@ -1740,16 +2982,16 @@ diff -Nrup a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c - len = str2 - string - (ps.__count & 7); \ - } \ - } \ -+ /* Search for th eend of the string, but don't search past \ -+ the length (in bytes) specified by the precision. */ \ -+ len = __strnlen (string, prec); \ ++ /* Search for the end of the string, but don't search past \ ++ the length (in bytes) specified by the precision. */ \ ++ len = __strnlen (string, prec); \ else \ len = strlen (string); \ } \ diff -Nrup a/streams/Makefile b/streams/Makefile ---- a/streams/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/streams/Makefile 2012-06-07 12:15:21.824318649 -0600 -@@ -20,7 +20,7 @@ +--- a/streams/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/streams/Makefile 2012-01-01 20:41:26.684439835 -0700 +@@ -21,7 +21,7 @@ # subdir := streams @@ -1759,9 +3001,9 @@ diff -Nrup a/streams/Makefile b/streams/Makefile include ../Rules diff -Nrup a/sunrpc/Makefile b/sunrpc/Makefile ---- a/sunrpc/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/sunrpc/Makefile 2012-06-07 12:15:21.825318645 -0600 -@@ -52,7 +52,7 @@ headers-in-tirpc = $(addprefix rpc/,auth +--- a/sunrpc/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/sunrpc/Makefile 2012-01-01 20:41:26.684439835 -0700 +@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth des_crypt.h) headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h @@ -1770,9 +3012,9 @@ diff -Nrup a/sunrpc/Makefile b/sunrpc/Makefile install-others = $(inst_sysconfdir)/rpc generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen -@@ -150,6 +150,10 @@ sunrpc-CPPFLAGS = -D_RPC_THREAD_SAFE_ - CPPFLAGS += $(sunrpc-CPPFLAGS) - BUILD_CPPFLAGS += $(sunrpc-CPPFLAGS) +@@ -152,6 +152,10 @@ CFLAGS-openchild.c = -fexceptions + + CPPFLAGS += -D_RPC_THREAD_SAFE_ +CFLAGS-clnt_tcp.c += -fno-strict-aliasing +CFLAGS-clnt_udp.c += -fno-strict-aliasing @@ -1782,9 +3024,9 @@ diff -Nrup a/sunrpc/Makefile b/sunrpc/Makefile $(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so diff -Nrup a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h ---- a/sysdeps/generic/dl-cache.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/generic/dl-cache.h 2012-06-07 12:15:21.825318645 -0600 -@@ -35,6 +35,14 @@ +--- a/sysdeps/generic/dl-cache.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/generic/dl-cache.h 2012-01-01 20:41:26.685439835 -0700 +@@ -36,6 +36,14 @@ # define add_system_dir(dir) add_dir (dir) #endif @@ -1800,8 +3042,8 @@ diff -Nrup a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h /* libc5 and glibc 2.0/2.1 use the same format. For glibc 2.2 another 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 +--- a/sysdeps/i386/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/i386/Makefile 2012-01-01 20:41:26.685439835 -0700 @@ -2,6 +2,8 @@ # Every i386 port in use uses gas syntax (I think). asm-CPPFLAGS += -DGAS_SYNTAX @@ -1811,7 +3053,7 @@ diff -Nrup a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile # The i386 `long double' is a distinct type we support. long-double-fcts = yes -@@ -62,6 +64,14 @@ endif +@@ -68,6 +70,14 @@ endif ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS))) defines += -DNO_TLS_DIRECT_SEG_REFS @@ -1827,8 +3069,8 @@ diff -Nrup a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile ifeq ($(subdir),elf) diff -Nrup a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile ---- a/sysdeps/i386/i686/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/i386/i686/Makefile 2012-06-07 12:15:21.826318641 -0600 +--- a/sysdeps/i386/i686/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/i386/i686/Makefile 2012-01-01 20:41:26.687439834 -0700 @@ -9,19 +9,3 @@ stack-align-test-flags += -msse ifeq ($(subdir),string) sysdep_routines += cacheinfo @@ -1849,9 +3091,377 @@ diff -Nrup a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile -ASFLAGS-.ob += -Wa,-mtune=i686 -ASFLAGS-.oS += -Wa,-mtune=i686 -endif +diff -Nrup a/sysdeps/ia64/Makefile b/sysdeps/ia64/Makefile +--- a/sysdeps/ia64/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/ia64/Makefile 2012-01-01 20:41:26.688439833 -0700 +@@ -12,8 +12,8 @@ elide-routines.os += hp-timing + + ifeq (yes,$(build-shared)) + # Compatibility +-sysdep_routines += ia64libgcc +-shared-only-routines += ia64libgcc ++sysdep_routines += libgcc-compat ++shared-only-routines += libgcc-compat + endif + endif + +diff -Nrup a/sysdeps/ia64/ia64libgcc.S b/sysdeps/ia64/ia64libgcc.S +--- a/sysdeps/ia64/ia64libgcc.S 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/ia64/ia64libgcc.S 1969-12-31 17:00:00.000000000 -0700 +@@ -1,350 +0,0 @@ +-/* From the Intel IA-64 Optimization Guide, choose the minimum latency +- alternative. */ +- +-#include +-#undef ret +- +-#include +- +-#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6) +- +-/* __divtf3 +- Compute a 80-bit IEEE double-extended quotient. +- farg0 holds the dividend. farg1 holds the divisor. */ +- +-ENTRY(___divtf3) +- cmp.eq p7, p0 = r0, r0 +- frcpa.s0 f10, p6 = farg0, farg1 +- ;; +-(p6) cmp.ne p7, p0 = r0, r0 +- .pred.rel.mutex p6, p7 +-(p6) fnma.s1 f11 = farg1, f10, f1 +-(p6) fma.s1 f12 = farg0, f10, f0 +- ;; +-(p6) fma.s1 f13 = f11, f11, f0 +-(p6) fma.s1 f14 = f11, f11, f11 +- ;; +-(p6) fma.s1 f11 = f13, f13, f11 +-(p6) fma.s1 f13 = f14, f10, f10 +- ;; +-(p6) fma.s1 f10 = f13, f11, f10 +-(p6) fnma.s1 f11 = farg1, f12, farg0 +- ;; +-(p6) fma.s1 f11 = f11, f10, f12 +-(p6) fnma.s1 f12 = farg1, f10, f1 +- ;; +-(p6) fma.s1 f10 = f12, f10, f10 +-(p6) fnma.s1 f12 = farg1, f11, farg0 +- ;; +-(p6) fma.s0 fret0 = f12, f10, f11 +-(p7) mov fret0 = f10 +- br.ret.sptk rp +-END(___divtf3) +- .symver ___divtf3, __divtf3@GLIBC_2.2 +- +-/* __divdf3 +- Compute a 64-bit IEEE double quotient. +- farg0 holds the dividend. farg1 holds the divisor. */ +- +-ENTRY(___divdf3) +- cmp.eq p7, p0 = r0, r0 +- frcpa.s0 f10, p6 = farg0, farg1 +- ;; +-(p6) cmp.ne p7, p0 = r0, r0 +- .pred.rel.mutex p6, p7 +-(p6) fmpy.s1 f11 = farg0, f10 +-(p6) fnma.s1 f12 = farg1, f10, f1 +- ;; +-(p6) fma.s1 f11 = f12, f11, f11 +-(p6) fmpy.s1 f13 = f12, f12 +- ;; +-(p6) fma.s1 f10 = f12, f10, f10 +-(p6) fma.s1 f11 = f13, f11, f11 +- ;; +-(p6) fmpy.s1 f12 = f13, f13 +-(p6) fma.s1 f10 = f13, f10, f10 +- ;; +-(p6) fma.d.s1 f11 = f12, f11, f11 +-(p6) fma.s1 f10 = f12, f10, f10 +- ;; +-(p6) fnma.d.s1 f8 = farg1, f11, farg0 +- ;; +-(p6) fma.d fret0 = f8, f10, f11 +-(p7) mov fret0 = f10 +- br.ret.sptk rp +- ;; +-END(___divdf3) +- .symver ___divdf3, __divdf3@GLIBC_2.2 +- +-/* __divsf3 +- Compute a 32-bit IEEE float quotient. +- farg0 holds the dividend. farg1 holds the divisor. */ +- +-ENTRY(___divsf3) +- cmp.eq p7, p0 = r0, r0 +- frcpa.s0 f10, p6 = farg0, farg1 +- ;; +-(p6) cmp.ne p7, p0 = r0, r0 +- .pred.rel.mutex p6, p7 +-(p6) fmpy.s1 f8 = farg0, f10 +-(p6) fnma.s1 f9 = farg1, f10, f1 +- ;; +-(p6) fma.s1 f8 = f9, f8, f8 +-(p6) fmpy.s1 f9 = f9, f9 +- ;; +-(p6) fma.s1 f8 = f9, f8, f8 +-(p6) fmpy.s1 f9 = f9, f9 +- ;; +-(p6) fma.d.s1 f10 = f9, f8, f8 +- ;; +-(p6) fnorm.s.s0 fret0 = f10 +-(p7) mov fret0 = f10 +- br.ret.sptk rp +- ;; +-END(___divsf3) +- .symver ___divsf3, __divsf3@GLIBC_2.2 +- +-/* __divdi3 +- Compute a 64-bit integer quotient. +- in0 holds the dividend. in1 holds the divisor. */ +- +-ENTRY(___divdi3) +- .regstk 2,0,0,0 +- /* Transfer inputs to FP registers. */ +- setf.sig f8 = in0 +- setf.sig f9 = in1 +- ;; +- /* Convert the inputs to FP, so that they won't be treated as +- unsigned. */ +- fcvt.xf f8 = f8 +- fcvt.xf f9 = f9 +- ;; +- /* Compute the reciprocal approximation. */ +- frcpa.s1 f10, p6 = f8, f9 +- ;; +- /* 3 Newton-Raphson iterations. */ +-(p6) fnma.s1 f11 = f9, f10, f1 +-(p6) fmpy.s1 f12 = f8, f10 +- ;; +-(p6) fmpy.s1 f13 = f11, f11 +-(p6) fma.s1 f12 = f11, f12, f12 +- ;; +-(p6) fma.s1 f10 = f11, f10, f10 +-(p6) fma.s1 f11 = f13, f12, f12 +- ;; +-(p6) fma.s1 f10 = f13, f10, f10 +-(p6) fnma.s1 f12 = f9, f11, f8 +- ;; +-(p6) fma.s1 f10 = f12, f10, f11 +- ;; +- /* Round quotient to an integer. */ +- fcvt.fx.trunc.s1 f10 = f10 +- ;; +- /* Transfer result to GP registers. */ +- getf.sig ret0 = f10 +- br.ret.sptk rp +- ;; +-END(___divdi3) +- .symver ___divdi3, __divdi3@GLIBC_2.2 +- +-/* __moddi3 +- Compute a 64-bit integer modulus. +- in0 holds the dividend (a). in1 holds the divisor (b). */ +- +-ENTRY(___moddi3) +- .regstk 2,0,0,0 +- /* Transfer inputs to FP registers. */ +- setf.sig f14 = in0 +- setf.sig f9 = in1 +- ;; +- /* Convert the inputs to FP, so that they won't be treated as +- unsigned. */ +- fcvt.xf f8 = f14 +- fcvt.xf f9 = f9 +- ;; +- /* Compute the reciprocal approximation. */ +- frcpa.s1 f10, p6 = f8, f9 +- ;; +- /* 3 Newton-Raphson iterations. */ +-(p6) fmpy.s1 f12 = f8, f10 +-(p6) fnma.s1 f11 = f9, f10, f1 +- ;; +-(p6) fma.s1 f12 = f11, f12, f12 +-(p6) fmpy.s1 f13 = f11, f11 +- ;; +-(p6) fma.s1 f10 = f11, f10, f10 +-(p6) fma.s1 f11 = f13, f12, f12 +- ;; +- sub in1 = r0, in1 +-(p6) fma.s1 f10 = f13, f10, f10 +-(p6) fnma.s1 f12 = f9, f11, f8 +- ;; +- setf.sig f9 = in1 +-(p6) fma.s1 f10 = f12, f10, f11 +- ;; +- fcvt.fx.trunc.s1 f10 = f10 +- ;; +- /* r = q * (-b) + a */ +- xma.l f10 = f10, f9, f14 +- ;; +- /* Transfer result to GP registers. */ +- getf.sig ret0 = f10 +- br.ret.sptk rp +- ;; +-END(___moddi3) +- .symver ___moddi3, __moddi3@GLIBC_2.2 +- +-/* __udivdi3 +- Compute a 64-bit unsigned integer quotient. +- in0 holds the dividend. in1 holds the divisor. */ +- +-ENTRY(___udivdi3) +- .regstk 2,0,0,0 +- /* Transfer inputs to FP registers. */ +- setf.sig f8 = in0 +- setf.sig f9 = in1 +- ;; +- /* Convert the inputs to FP, to avoid FP software-assist faults. */ +- fcvt.xuf.s1 f8 = f8 +- fcvt.xuf.s1 f9 = f9 +- ;; +- /* Compute the reciprocal approximation. */ +- frcpa.s1 f10, p6 = f8, f9 +- ;; +- /* 3 Newton-Raphson iterations. */ +-(p6) fnma.s1 f11 = f9, f10, f1 +-(p6) fmpy.s1 f12 = f8, f10 +- ;; +-(p6) fmpy.s1 f13 = f11, f11 +-(p6) fma.s1 f12 = f11, f12, f12 +- ;; +-(p6) fma.s1 f10 = f11, f10, f10 +-(p6) fma.s1 f11 = f13, f12, f12 +- ;; +-(p6) fma.s1 f10 = f13, f10, f10 +-(p6) fnma.s1 f12 = f9, f11, f8 +- ;; +-(p6) fma.s1 f10 = f12, f10, f11 +- ;; +- /* Round quotient to an unsigned integer. */ +- fcvt.fxu.trunc.s1 f10 = f10 +- ;; +- /* Transfer result to GP registers. */ +- getf.sig ret0 = f10 +- br.ret.sptk rp +- ;; +-END(___udivdi3) +- .symver ___udivdi3, __udivdi3@GLIBC_2.2 +- +-/* __umoddi3 +- Compute a 64-bit unsigned integer modulus. +- in0 holds the dividend (a). in1 holds the divisor (b). */ +- +-ENTRY(___umoddi3) +- .regstk 2,0,0,0 +- /* Transfer inputs to FP registers. */ +- setf.sig f14 = in0 +- setf.sig f9 = in1 +- ;; +- /* Convert the inputs to FP, to avoid FP software assist faults. */ +- fcvt.xuf.s1 f8 = f14 +- fcvt.xuf.s1 f9 = f9 +- ;; +- /* Compute the reciprocal approximation. */ +- frcpa.s1 f10, p6 = f8, f9 +- ;; +- /* 3 Newton-Raphson iterations. */ +-(p6) fmpy.s1 f12 = f8, f10 +-(p6) fnma.s1 f11 = f9, f10, f1 +- ;; +-(p6) fma.s1 f12 = f11, f12, f12 +-(p6) fmpy.s1 f13 = f11, f11 +- ;; +-(p6) fma.s1 f10 = f11, f10, f10 +-(p6) fma.s1 f11 = f13, f12, f12 +- ;; +- sub in1 = r0, in1 +-(p6) fma.s1 f10 = f13, f10, f10 +-(p6) fnma.s1 f12 = f9, f11, f8 +- ;; +- setf.sig f9 = in1 +-(p6) fma.s1 f10 = f12, f10, f11 +- ;; +- /* Round quotient to an unsigned integer. */ +- fcvt.fxu.trunc.s1 f10 = f10 +- ;; +- /* r = q * (-b) + a */ +- xma.l f10 = f10, f9, f14 +- ;; +- /* Transfer result to GP registers. */ +- getf.sig ret0 = f10 +- br.ret.sptk rp +- ;; +-END(___umoddi3) +- .symver ___umoddi3, __umoddi3@GLIBC_2.2 +- +-/* __multi3 +- Compute a 128-bit multiply of 128-bit multiplicands. +- in0/in1 holds one multiplicand (a), in2/in3 holds the other one (b). */ +- +-ENTRY(___multi3) +- .regstk 4,0,0,0 +- setf.sig f6 = in1 +- movl r19 = 0xffffffff +- setf.sig f7 = in2 +- ;; +- and r14 = r19, in0 +- ;; +- setf.sig f10 = r14 +- and r14 = r19, in2 +- xmpy.l f9 = f6, f7 +- ;; +- setf.sig f6 = r14 +- shr.u r14 = in0, 32 +- ;; +- setf.sig f7 = r14 +- shr.u r14 = in2, 32 +- ;; +- setf.sig f8 = r14 +- xmpy.l f11 = f10, f6 +- xmpy.l f6 = f7, f6 +- ;; +- getf.sig r16 = f11 +- xmpy.l f7 = f7, f8 +- ;; +- shr.u r14 = r16, 32 +- and r16 = r19, r16 +- getf.sig r17 = f6 +- setf.sig f6 = in0 +- ;; +- setf.sig f11 = r14 +- getf.sig r21 = f7 +- setf.sig f7 = in3 +- ;; +- xma.l f11 = f10, f8, f11 +- xma.l f6 = f6, f7, f9 +- ;; +- getf.sig r18 = f11 +- ;; +- add r18 = r18, r17 +- ;; +- and r15 = r19, r18 +- cmp.ltu p7, p6 = r18, r17 +- ;; +- getf.sig r22 = f6 +-(p7) adds r14 = 1, r19 +- ;; +-(p7) add r21 = r21, r14 +- shr.u r14 = r18, 32 +- shl r15 = r15, 32 +- ;; +- add r20 = r21, r14 +- ;; +- add ret0 = r15, r16 +- add ret1 = r22, r20 +- br.ret.sptk rp +- ;; +-END(___multi3) +- .symver ___multi3, __multi3@GLIBC_2.2 +- +-#endif diff -Nrup a/sysdeps/ia64/libgcc-compat.c b/sysdeps/ia64/libgcc-compat.c --- a/sysdeps/ia64/libgcc-compat.c 1969-12-31 17:00:00.000000000 -0700 -+++ b/sysdeps/ia64/libgcc-compat.c 2012-06-07 12:15:21.826318641 -0600 ++++ b/sysdeps/ia64/libgcc-compat.c 2012-01-01 20:41:26.694439833 -0700 @@ -0,0 +1,84 @@ +/* pre-.hidden libgcc compatibility + Copyright (C) 2002 Free Software Foundation, Inc. @@ -1938,17 +3548,17 @@ diff -Nrup a/sysdeps/ia64/libgcc-compat.c b/sysdeps/ia64/libgcc-compat.c + +#endif diff -Nrup a/sysdeps/mach/hurd/getrlimit.c b/sysdeps/mach/hurd/getrlimit.c ---- a/sysdeps/mach/hurd/getrlimit.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/mach/hurd/getrlimit.c 2012-06-07 12:15:21.826318641 -0600 -@@ -43,4 +43,5 @@ __getrlimit (enum __rlimit_resource reso +--- a/sysdeps/mach/hurd/getrlimit.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/mach/hurd/getrlimit.c 2012-01-01 20:41:26.694439833 -0700 +@@ -44,4 +44,5 @@ __getrlimit (enum __rlimit_resource reso return 0; } +libc_hidden_def (__getrlimit) weak_alias (__getrlimit, getrlimit) diff -Nrup a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c ---- a/sysdeps/posix/getaddrinfo.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/posix/getaddrinfo.c 2012-06-07 12:15:21.827318637 -0600 +--- a/sysdeps/posix/getaddrinfo.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/posix/getaddrinfo.c 2012-01-01 20:41:26.695439833 -0700 @@ -565,8 +565,8 @@ gaih_inet (const char *name, const struc /* If we do not have to look for IPv6 addresses, use @@ -2074,22 +3684,29 @@ diff -Nrup a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c { { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 } }; 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,9 @@ CFLAGS-rtld-memmove.os = $(no-special-re +--- a/sysdeps/powerpc/powerpc64/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/powerpc/powerpc64/Makefile 2012-01-01 20:41:26.695439833 -0700 +@@ -33,6 +33,7 @@ ifneq ($(elf),no) + # we use -fpic instead which is much better. + CFLAGS-initfini.s += -fpic -O1 + endif ++CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables + endif + + ifeq ($(subdir),elf) +diff -Nrup a/sysdeps/powerpc/powerpc64/elf/Makefile b/sysdeps/powerpc/powerpc64/elf/Makefile +--- a/sysdeps/powerpc/powerpc64/elf/Makefile 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/powerpc/powerpc64/elf/Makefile 2012-01-01 20:41:26.696439833 -0700 +@@ -9,3 +9,5 @@ CFLAGS-rtld-mempcpy.os = $(no-special-re + CFLAGS-rtld-memmove.os = $(no-special-regs) CFLAGS-rtld-memchr.os = $(no-special-regs) CFLAGS-rtld-strnlen.os = $(no-special-regs) - -+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 ++CFLAGS-gmon-start.c = -fno-strict-aliasing diff -Nrup a/sysdeps/s390/s390-64/utf16-utf32-z9.c b/sysdeps/s390/s390-64/utf16-utf32-z9.c ---- a/sysdeps/s390/s390-64/utf16-utf32-z9.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/s390/s390-64/utf16-utf32-z9.c 2012-06-07 12:15:21.829318630 -0600 -@@ -168,10 +168,7 @@ gconv_end (struct __gconv_step *data) +--- a/sysdeps/s390/s390-64/utf16-utf32-z9.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/s390/s390-64/utf16-utf32-z9.c 2012-01-01 20:41:26.696439833 -0700 +@@ -169,10 +169,7 @@ gconv_end (struct __gconv_step *data) register unsigned long long outlen asm("11") = outend - outptr; \ uint64_t cc = 0; \ \ @@ -2102,9 +3719,9 @@ diff -Nrup a/sysdeps/s390/s390-64/utf16-utf32-z9.c b/sysdeps/s390/s390-64/utf16- " ipm %2 \n" \ : "+a" (pOutput), "+a" (pInput), "+d" (cc), \ diff -Nrup a/sysdeps/s390/s390-64/utf8-utf16-z9.c b/sysdeps/s390/s390-64/utf8-utf16-z9.c ---- a/sysdeps/s390/s390-64/utf8-utf16-z9.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/s390/s390-64/utf8-utf16-z9.c 2012-06-07 12:15:21.829318630 -0600 -@@ -150,10 +150,7 @@ gconv_end (struct __gconv_step *data) +--- a/sysdeps/s390/s390-64/utf8-utf16-z9.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/s390/s390-64/utf8-utf16-z9.c 2012-01-01 20:41:26.697439833 -0700 +@@ -151,10 +151,7 @@ gconv_end (struct __gconv_step *data) register unsigned long long outlen asm("11") = outend - outptr; \ uint64_t cc = 0; \ \ @@ -2117,9 +3734,9 @@ diff -Nrup a/sysdeps/s390/s390-64/utf8-utf16-z9.c b/sysdeps/s390/s390-64/utf8-ut " ipm %2 \n" \ : "+a" (pOutput), "+a" (pInput), "+d" (cc), \ diff -Nrup a/sysdeps/s390/s390-64/utf8-utf32-z9.c b/sysdeps/s390/s390-64/utf8-utf32-z9.c ---- a/sysdeps/s390/s390-64/utf8-utf32-z9.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/s390/s390-64/utf8-utf32-z9.c 2012-06-07 12:15:21.829318630 -0600 -@@ -154,10 +154,7 @@ gconv_end (struct __gconv_step *data) +--- a/sysdeps/s390/s390-64/utf8-utf32-z9.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/s390/s390-64/utf8-utf32-z9.c 2012-01-01 20:41:26.697439833 -0700 +@@ -155,10 +155,7 @@ gconv_end (struct __gconv_step *data) register unsigned long long outlen asm("11") = outend - outptr; \ uint64_t cc = 0; \ \ @@ -2132,9 +3749,9 @@ diff -Nrup a/sysdeps/s390/s390-64/utf8-utf32-z9.c b/sysdeps/s390/s390-64/utf8-ut " ipm %2 \n" \ : "+a" (pOutput), "+a" (pInput), "+d" (cc), \ diff -Nrup a/sysdeps/unix/nice.c b/sysdeps/unix/nice.c ---- a/sysdeps/unix/nice.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/unix/nice.c 2012-06-07 12:15:21.829318630 -0600 -@@ -41,7 +41,12 @@ nice (int incr) +--- a/sysdeps/unix/nice.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/unix/nice.c 2012-01-01 20:41:26.698439833 -0700 +@@ -42,7 +42,12 @@ nice (int incr) __set_errno (save); } @@ -2149,9 +3766,9 @@ diff -Nrup a/sysdeps/unix/nice.c b/sysdeps/unix/nice.c { if (errno == EACCES) diff -Nrup a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c ---- a/sysdeps/unix/sysv/linux/check_pf.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/unix/sysv/linux/check_pf.c 2012-06-07 12:15:21.830318627 -0600 -@@ -26,16 +26,14 @@ +--- a/sysdeps/unix/sysv/linux/check_pf.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/check_pf.c 2012-01-01 20:41:26.698439833 -0700 +@@ -27,16 +27,14 @@ #include #include @@ -2171,9 +3788,9 @@ diff -Nrup a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_ #ifndef IFA_F_HOMEADDRESS # define IFA_F_HOMEADDRESS 0 diff -Nrup a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c ---- a/sysdeps/unix/sysv/linux/futimesat.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/unix/sysv/linux/futimesat.c 2012-06-07 12:15:21.830318627 -0600 -@@ -36,14 +36,14 @@ futimesat (fd, file, tvp) +--- a/sysdeps/unix/sysv/linux/futimesat.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/futimesat.c 2012-01-01 20:41:26.699439832 -0700 +@@ -37,14 +37,14 @@ futimesat (fd, file, tvp) { int result; @@ -2191,7 +3808,7 @@ diff -Nrup a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futim result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp); # ifndef __ASSUME_ATFCTS if (result == -1 && errno == ENOSYS) -@@ -57,22 +57,7 @@ futimesat (fd, file, tvp) +@@ -58,22 +58,7 @@ futimesat (fd, file, tvp) #ifndef __ASSUME_ATFCTS char *buf = NULL; @@ -2217,7 +3834,7 @@ diff -Nrup a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futim if (__builtin_expect (filelen == 0, 0)) diff -Nrup a/sysdeps/unix/sysv/linux/i386/dl-cache.h b/sysdeps/unix/sysv/linux/i386/dl-cache.h --- a/sysdeps/unix/sysv/linux/i386/dl-cache.h 1969-12-31 17:00:00.000000000 -0700 -+++ b/sysdeps/unix/sysv/linux/i386/dl-cache.h 2012-06-07 12:15:21.830318627 -0600 ++++ b/sysdeps/unix/sysv/linux/i386/dl-cache.h 2012-01-01 20:41:26.700439831 -0700 @@ -0,0 +1,59 @@ +/* Support for reading /etc/ld.so.cache files written by Linux ldconfig. + Copyright (C) 2004 Free Software Foundation, Inc. @@ -2279,17 +3896,52 @@ diff -Nrup a/sysdeps/unix/sysv/linux/i386/dl-cache.h b/sysdeps/unix/sysv/linux/i + +#include_next diff -Nrup a/sysdeps/unix/sysv/linux/i386/getrlimit.c b/sysdeps/unix/sysv/linux/i386/getrlimit.c ---- a/sysdeps/unix/sysv/linux/i386/getrlimit.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/unix/sysv/linux/i386/getrlimit.c 2012-06-07 12:15:21.830318627 -0600 -@@ -35,4 +35,5 @@ __new_getrlimit (enum __rlimit_resource +--- a/sysdeps/unix/sysv/linux/i386/getrlimit.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/i386/getrlimit.c 2012-01-01 20:41:26.700439831 -0700 +@@ -79,4 +79,5 @@ __new_getrlimit (enum __rlimit_resource } weak_alias (__new_getrlimit, __getrlimit); +libc_hidden_weak (__getrlimit) versioned_symbol (libc, __new_getrlimit, getrlimit, GLIBC_2_2); +diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-cache.h b/sysdeps/unix/sysv/linux/ia64/dl-cache.h +--- a/sysdeps/unix/sysv/linux/ia64/dl-cache.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/ia64/dl-cache.h 2012-01-01 20:41:26.701439831 -0700 +@@ -22,4 +22,31 @@ + #define _dl_cache_check_flags(flags) \ + ((flags) == _DL_CACHE_DEFAULT_ID) + ++#define EMUL_HACK "/emul/ia32-linux" ++ ++#define arch_startup(argc, argv) unlink (EMUL_HACK LD_SO_CACHE) ++ ++#define add_arch_dirs(config_file) \ ++ do { \ ++ int save_verbose = opt_verbose; \ ++ opt_verbose = 0; \ ++ \ ++ parse_conf (config_file, EMUL_HACK, true); \ ++ \ ++ /* Always add the standard search paths. */ \ ++ add_system_dir (EMUL_HACK SLIBDIR); \ ++ if (strcmp (SLIBDIR, LIBDIR)) \ ++ add_system_dir (EMUL_HACK LIBDIR); \ ++ \ ++ char emul_config_file[strlen (config_file) \ ++ + sizeof EMUL_HACK]; \ ++ strcpy (mempcpy (emul_config_file, EMUL_HACK, \ ++ strlen (EMUL_HACK)), config_file); \ ++ \ ++ if (! access (emul_config_file, R_OK)) \ ++ parse_conf (emul_config_file, EMUL_HACK, true); \ ++ \ ++ opt_verbose = save_verbose; \ ++ } while (0) ++ + #include_next diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c --- a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 1969-12-31 17:00:00.000000000 -0700 -+++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 2012-06-07 12:15:21.831318623 -0600 ++++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 2012-01-01 20:41:26.701439831 -0700 @@ -0,0 +1,5 @@ +#ifdef IS_IN_ldconfig +#include @@ -2298,17 +3950,23 @@ diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c b/sysdeps/unix/sysv/linu +#endif diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h --- a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 1969-12-31 17:00:00.000000000 -0700 -+++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 2012-06-07 12:15:21.831318623 -0600 ++++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 2012-01-01 20:41:26.701439831 -0700 @@ -0,0 +1,5 @@ +#ifdef IS_IN_ldconfig +#include +#else +#include +#endif +diff -Nrup a/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed +--- a/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed 2012-01-01 20:41:26.701439831 -0700 +@@ -1 +1 @@ +-s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_ ++s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 /emul/ia32-linux\2\3"_ diff -Nrup a/sysdeps/unix/sysv/linux/netlinkaccess.h b/sysdeps/unix/sysv/linux/netlinkaccess.h ---- a/sysdeps/unix/sysv/linux/netlinkaccess.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/unix/sysv/linux/netlinkaccess.h 2012-06-07 12:15:21.831318623 -0600 -@@ -24,6 +24,24 @@ +--- a/sysdeps/unix/sysv/linux/netlinkaccess.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/netlinkaccess.h 2012-01-01 20:41:26.702439831 -0700 +@@ -25,6 +25,24 @@ #include @@ -2334,8 +3992,8 @@ diff -Nrup a/sysdeps/unix/sysv/linux/netlinkaccess.h b/sysdeps/unix/sysv/linux/n struct netlink_res { diff -Nrup a/sysdeps/unix/sysv/linux/paths.h b/sysdeps/unix/sysv/linux/paths.h ---- a/sysdeps/unix/sysv/linux/paths.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/unix/sysv/linux/paths.h 2012-06-07 12:15:21.831318623 -0600 +--- a/sysdeps/unix/sysv/linux/paths.h 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/paths.h 2012-01-01 20:41:26.702439831 -0700 @@ -62,7 +62,7 @@ #define _PATH_TTY "/dev/tty" #define _PATH_UNIX "/boot/vmlinux" @@ -2346,9 +4004,9 @@ diff -Nrup a/sysdeps/unix/sysv/linux/paths.h b/sysdeps/unix/sysv/linux/paths.h /* Provide trailing slash, since mostly used for building pathnames. */ 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 +--- a/sysdeps/unix/sysv/linux/tcsetattr.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/tcsetattr.c 2012-01-01 20:41:26.703439831 -0700 +@@ -49,6 +49,7 @@ tcsetattr (fd, optional_actions, termios { struct __kernel_termios k_termios; unsigned long int cmd; @@ -2356,7 +4014,7 @@ diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcset switch (optional_actions) { -@@ -79,6 +80,35 @@ tcsetattr (fd, optional_actions, termios +@@ -80,6 +81,35 @@ tcsetattr (fd, optional_actions, termios memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0], __KERNEL_NCCS * sizeof (cc_t)); @@ -2393,3 +4051,15 @@ diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcset + return retval; } libc_hidden_def (tcsetattr) +diff -Nrup a/timezone/zic.c b/timezone/zic.c +--- a/timezone/zic.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/timezone/zic.c 2012-01-01 20:41:26.705439831 -0700 +@@ -1921,7 +1921,7 @@ const int zonecount; + if (stdrp != NULL && stdrp->r_hiyear == 2037) + return; + } +- if (stdrp == NULL && zp->z_nrules != 0) ++ if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0)) + return; + abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar; + doabbr(result, zp->z_format, abbrvar, FALSE, TRUE); diff --git a/glibc-ports-2.16.0.tar.xz.sig b/glibc-ports-2.16.0.tar.xz.sig deleted file mode 100644 index 46bed94..0000000 --- a/glibc-ports-2.16.0.tar.xz.sig +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.11 (GNU/Linux) - -iQEcBAABAgAGBQJP71okAAoJECXvCkNsKkr/sNQIAL9cDaYqmOuvl2dNQoAgZxHW -43BhiOG3gOSGzooEGFSwJZdR1QlT8Nk9/SMIpiR6m5v6EzT/UjmpXE9l8FgwR31X -aXZDGqWy+kvpAkPh+xGzPVTaGHHifuGTUQQctiEMfMiGdjl9sSV42YpTARb//xgE -qPA2MhBWZOCjJgY9D4rGlV9sopZ99jbntv69O0RcKDGNrciGE/DuuXXmLtnfSI3F -XxpZWVZMNUQDU73bWXCCbe/agVOmmvGz0SY9T+RA1ui4XBk705m+9JrWqe00xqJi -t9UkjU7DsTZ86q+lnCTMV4/LpAehUsgKYJnzgraI1t/bxrHZQk3BsmPqhxScO1Y= -=4OMI ------END PGP SIGNATURE----- diff --git a/glibc-rh446078.patch b/glibc-rh446078.patch new file mode 100644 index 0000000..311cb3e --- /dev/null +++ b/glibc-rh446078.patch @@ -0,0 +1,13 @@ +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 "/ + / + " ++first_weekday 2 ++first_workday 2 + END LC_TIME + + LC_PAPER diff --git a/glibc-rh454629.patch b/glibc-rh454629.patch new file mode 100644 index 0000000..42f93e1 --- /dev/null +++ b/glibc-rh454629.patch @@ -0,0 +1,13 @@ +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 "/ + / + " ++first_weekday 2 ++first_workday 2 + END LC_TIME + + LC_PAPER diff --git a/glibc-rh552960-2.patch b/glibc-rh552960-2.patch new file mode 100644 index 0000000..3859a32 --- /dev/null +++ b/glibc-rh552960-2.patch @@ -0,0 +1,27 @@ +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 diff --git a/glibc-rh622499.patch b/glibc-rh622499.patch new file mode 100644 index 0000000..6e26a85 --- /dev/null +++ b/glibc-rh622499.patch @@ -0,0 +1,13 @@ +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 "/ + / + " ++first_weekday 2 ++first_workday 2 + END LC_TIME + + LC_MESSAGES diff --git a/glibc-rh624296.patch b/glibc-rh624296.patch new file mode 100644 index 0000000..c03994b --- /dev/null +++ b/glibc-rh624296.patch @@ -0,0 +1,13 @@ +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 "/ + / + " ++first_weekday 2 ++first_workday 2 + END LC_TIME + + LC_PAPER +Only in b/localedata/locales: uk_UA.rej diff --git a/glibc-rh697149.patch b/glibc-rh697149.patch deleted file mode 100644 index e94e0a7..0000000 --- a/glibc-rh697149.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -rup a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c ---- a/sysdeps/unix/sysv/linux/check_pf.c 2012-02-16 22:51:17.148797741 -0700 -+++ b/sysdeps/unix/sysv/linux/check_pf.c 2012-02-17 10:55:26.513139941 -0700 -@@ -209,7 +209,8 @@ make_request (int fd, pid_t pid) - } - else - { -- if (!IN6_IS_ADDR_LOOPBACK (address)) -+ if (!IN6_IS_ADDR_LOOPBACK (address) -+ && !IN6_IS_ADDR_LINKLOCAL (address)) - seen_ipv6 = true; - } - } -Only in b/sysdeps/x86_64: .dl-trampoline.S.swp diff --git a/glibc-rh729661.patch b/glibc-rh729661.patch new file mode 100644 index 0000000..5d4ba8d --- /dev/null +++ b/glibc-rh729661.patch @@ -0,0 +1,56 @@ +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; + diff --git a/glibc-rh730856.patch b/glibc-rh730856.patch index 14270ed..f7bd5d1 100644 --- a/glibc-rh730856.patch +++ b/glibc-rh730856.patch @@ -1,52 +1,16 @@ -diff -rup a/resolv/res_query.c b/resolv/res_query.c ---- a/resolv/res_query.c 2012-02-16 22:51:17.451796009 -0700 -+++ b/resolv/res_query.c 2012-02-16 22:54:42.522623598 -0700 -@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp, - int *resplen2) - { - HEADER *hp = (HEADER *) answer; -+ HEADER *hp2; - int n, use_malloc = 0; - u_int oflags = statp->_flags; - -@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp, - /* __libc_res_nsend might have reallocated the buffer. */ - hp = (HEADER *) *answerp; - -- /* We simplify the following tests by assigning HP to HP2. It -- is easy to verify that this is the same as ignoring all -- tests of HP2. */ -- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp; -- -- if (n < (int) sizeof (HEADER) && answerp2 != NULL -- && *resplen2 > (int) sizeof (HEADER)) -+ /* We simplify the following tests by assigning HP to HP2 or -+ vice versa. It is easy to verify that this is the same as -+ ignoring all tests of HP or HP2. */ -+ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER)) +2011-09-01 Andreas Schwab + + * 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. */ + /* Special case of partial answer. */ - assert (hp != hp2); -- hp = hp2; -+ hp2 = hp; ++ assert (n == 0 || hp != hp2); + hp = hp2; } -- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER) -- && n > (int) sizeof (HEADER)) -+ else - { -- /* Special case of partial answer. */ -- assert (hp != hp2); -- hp2 = hp; -+ hp2 = (HEADER *) *answerp2; -+ if (n < (int) sizeof (HEADER)) -+ { -+ hp = hp2; -+ } - } - -+ /* Make sure both hp and hp2 are defined */ -+ assert((hp != NULL) && (hp2 != NULL)); -+ - if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0) - && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) { - #ifdef DEBUG + else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER) diff --git a/glibc-rh739743.patch b/glibc-rh739743.patch deleted file mode 100644 index c390b77..0000000 --- a/glibc-rh739743.patch +++ /dev/null @@ -1,55 +0,0 @@ -2009-04-26 Aurelien Jarno - - * sysdeps/posix/getaddrinfo.c (rfc3484_sort): don't assign native - result if the result has no associated interface. - ---- - sysdeps/posix/getaddrinfo.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/sysdeps/posix/getaddrinfo.c -+++ b/sysdeps/posix/getaddrinfo.c -@@ -1456,13 +1456,13 @@ - - /* Fill in the results in all the records. */ - for (int i = 0; i < src->nresults; ++i) -- if (src->results[i].index == a1_index) -+ if (a1_index != -1 && src->results[i].index == a1_index) - { - assert (src->results[i].native == -1 - || src->results[i].native == a1_native); - src->results[i].native = a1_native; - } -- else if (src->results[i].index == a2_index) -+ else if (a2_index != -1 && src->results[i].index == a2_index) - { - assert (src->results[i].native == -1 - || src->results[i].native == a2_native); - -2009-03-15 Aurelien Jarno - - * sysdeps/posix/getaddrinfo.c (getaddrinfo): correctly detect - interface for all 127.X.Y.Z addresses. - ---- - sysdeps/posix/getaddrinfo.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - ---- a/sysdeps/posix/getaddrinfo.c -+++ b/sysdeps/posix/getaddrinfo.c -@@ -2265,7 +2265,14 @@ - tmp.addr[0] = 0; - tmp.addr[1] = 0; - tmp.addr[2] = htonl (0xffff); -- tmp.addr[3] = sinp->sin_addr.s_addr; -+ /* Special case for lo interface, the source address -+ being possibly different than the interface -+ address. */ -+ if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000) -+ == 0x7f000000) -+ tmp.addr[3] = htonl(0x7f000001); -+ else -+ tmp.addr[3] = sinp->sin_addr.s_addr; - } - else - { diff --git a/glibc-rh740506.patch b/glibc-rh740506.patch new file mode 100644 index 0000000..99cf22c --- /dev/null +++ b/glibc-rh740506.patch @@ -0,0 +1,40 @@ + * 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 +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; diff --git a/glibc-rh740682.patch b/glibc-rh740682.patch new file mode 100644 index 0000000..b0418d1 --- /dev/null +++ b/glibc-rh740682.patch @@ -0,0 +1,12 @@ +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 diff --git a/glibc-rh757881.patch b/glibc-rh757881.patch index 9db0434..0b41987 100644 --- a/glibc-rh757881.patch +++ b/glibc-rh757881.patch @@ -1,7 +1,8 @@ -diff -Nrup a/malloc/arena.c b/malloc/arena.c ---- a/malloc/arena.c 2012-05-29 16:45:53.000000000 -0600 -+++ b/malloc/arena.c 2012-05-30 00:13:40.683514016 -0600 -@@ -673,7 +673,7 @@ heap_trim(heap_info *heap, size_t pad) +Index: glibc-2.12-2-gc4ccff1/malloc/arena.c +=================================================================== +--- glibc-2.12-2-gc4ccff1.orig/malloc/arena.c ++++ glibc-2.12-2-gc4ccff1/malloc/arena.c +@@ -870,7 +870,7 @@ heap_trim(heap, pad) heap_info *heap; si heap = prev_heap; if(!prev_inuse(p)) { /* consolidate backward */ p = prev_chunk(p); @@ -10,10 +11,11 @@ diff -Nrup a/malloc/arena.c b/malloc/arena.c } assert(((unsigned long)((char*)p + new_size) & (pagesz-1)) == 0); assert( ((char*)p + new_size) == ((char*)heap + heap->size) ); -diff -Nrup a/malloc/hooks.c b/malloc/hooks.c ---- a/malloc/hooks.c 2012-05-29 16:45:53.000000000 -0600 -+++ b/malloc/hooks.c 2012-05-30 00:13:40.684514011 -0600 -@@ -191,7 +191,9 @@ top_check(void) +Index: glibc-2.12-2-gc4ccff1/malloc/hooks.c +=================================================================== +--- glibc-2.12-2-gc4ccff1.orig/malloc/hooks.c ++++ glibc-2.12-2-gc4ccff1/malloc/hooks.c +@@ -219,7 +219,9 @@ top_check() (char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem))) return 0; @@ -23,10 +25,11 @@ diff -Nrup a/malloc/hooks.c b/malloc/hooks.c /* Try to set up a new top chunk. */ brk = MORECORE(0); -diff -Nrup a/malloc/malloc.c b/malloc/malloc.c ---- a/malloc/malloc.c 2012-05-29 16:45:53.000000000 -0600 -+++ b/malloc/malloc.c 2012-05-30 00:13:40.686514001 -0600 -@@ -1424,12 +1424,14 @@ typedef struct malloc_chunk* mbinptr; +Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c +=================================================================== +--- glibc-2.12-2-gc4ccff1.orig/malloc/malloc.c ++++ glibc-2.12-2-gc4ccff1/malloc/malloc.c +@@ -1541,12 +1541,14 @@ #define last(b) ((b)->bk) /* Take a chunk off a bin list */ @@ -44,7 +47,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c FD->bk = BK; \ BK->fd = FD; \ if (!in_smallbin_range (P->size) \ -@@ -2511,7 +2513,9 @@ static void* sysmalloc(INTERNAL_SIZE_T n +@@ -2593,7 +2595,9 @@ else if (contiguous(av) && old_size && brk < old_end) { /* Oops! Someone else killed our space.. Can't touch anything. */ @@ -54,7 +57,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c } /* -@@ -3345,7 +3349,9 @@ _int_malloc(mstate av, size_t bytes) +@@ -3467,7 +3471,9 @@ { errstr = "malloc(): memory corruption (fast)"; errout: @@ -64,7 +67,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c return NULL; } check_remalloced_chunk(av, victim, nb); -@@ -3430,8 +3436,12 @@ _int_malloc(mstate av, size_t bytes) +@@ -3552,8 +3558,12 @@ bck = victim->bk; if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0) || __builtin_expect (victim->size > av->system_mem, 0)) @@ -79,7 +82,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c size = chunksize(victim); /* -@@ -3572,7 +3582,7 @@ _int_malloc(mstate av, size_t bytes) +@@ -3694,7 +3704,7 @@ victim = victim->fd; remainder_size = size - nb; @@ -88,7 +91,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c /* Exhaust */ if (remainder_size < MINSIZE) { -@@ -3670,7 +3680,7 @@ _int_malloc(mstate av, size_t bytes) +@@ -3792,7 +3802,7 @@ remainder_size = size - nb; /* unlink */ @@ -97,7 +100,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c /* Exhaust */ if (remainder_size < MINSIZE) { -@@ -3805,9 +3815,11 @@ _int_free(mstate av, mchunkptr p, int ha +@@ -3927,9 +3937,11 @@ { errstr = "free(): invalid pointer"; errout: @@ -109,8 +112,8 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c + mutex_lock(&av->mutex); return; } - /* We know that each chunk is at least MINSIZE bytes in size or a -@@ -3952,7 +3964,7 @@ _int_free(mstate av, mchunkptr p, int ha + /* We know that each chunk is at least MINSIZE bytes in size. */ +@@ -4073,7 +4085,7 @@ prevsize = p->prev_size; size += prevsize; p = chunk_at_offset(p, -((long) prevsize)); @@ -119,7 +122,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c } if (nextchunk != av->top) { -@@ -3961,7 +3973,7 @@ _int_free(mstate av, mchunkptr p, int ha +@@ -4082,7 +4094,7 @@ /* consolidate forward */ if (!nextinuse) { @@ -128,7 +131,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c size += nextsize; } else clear_inuse_bit_at_offset(nextchunk, 0); -@@ -4122,7 +4134,7 @@ static void malloc_consolidate(mstate av +@@ -4243,7 +4255,7 @@ prevsize = p->prev_size; size += prevsize; p = chunk_at_offset(p, -((long) prevsize)); @@ -137,7 +140,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c } if (nextchunk != av->top) { -@@ -4130,7 +4142,7 @@ static void malloc_consolidate(mstate av +@@ -4251,7 +4263,7 @@ if (!nextinuse) { size += nextsize; @@ -146,7 +149,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c } else clear_inuse_bit_at_offset(nextchunk, 0); -@@ -4199,7 +4211,9 @@ _int_realloc(mstate av, mchunkptr oldp, +@@ -4320,7 +4332,9 @@ { errstr = "realloc(): invalid old size"; errout: @@ -156,7 +159,7 @@ diff -Nrup a/malloc/malloc.c b/malloc/malloc.c return NULL; } -@@ -4241,7 +4255,7 @@ _int_realloc(mstate av, mchunkptr oldp, +@@ -4362,7 +4376,7 @@ (unsigned long)(newsize = oldsize + nextsize) >= (unsigned long)(nb)) { newp = oldp; diff --git a/glibc-rh767693-2.patch b/glibc-rh767693-2.patch deleted file mode 100644 index 97d3658..0000000 --- a/glibc-rh767693-2.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -rup a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c ---- a/sunrpc/svc_tcp.c 2012-05-31 20:37:43.000000000 -0600 -+++ b/sunrpc/svc_tcp.c 2012-06-05 11:30:09.948733571 -0600 -@@ -44,6 +44,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -247,6 +248,11 @@ again: - { - if (errno == EINTR) - goto again; -+ if (errno == EMFILE) -+ { -+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; -+ __nanosleep(&ts , NULL); -+ } - return FALSE; - } - /* -diff -rup a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c ---- a/sunrpc/svc_udp.c 2012-05-31 20:37:43.000000000 -0600 -+++ b/sunrpc/svc_udp.c 2012-06-05 11:30:09.948733571 -0600 -@@ -40,6 +40,7 @@ - #include - #include - #include -+#include - - #ifdef IP_PKTINFO - #include -@@ -277,8 +278,16 @@ again: - (int) su->su_iosz, 0, - (struct sockaddr *) &(xprt->xp_raddr), &len); - xprt->xp_addrlen = len; -- if (rlen == -1 && errno == EINTR) -- goto again; -+ if (rlen == -1) -+ { -+ if (errno == EINTR) -+ goto again; -+ if (errno == EMFILE) -+ { -+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; -+ __nanosleep(&ts , NULL); -+ } -+ } - if (rlen < 16) /* < 4 32-bit ints? */ - return FALSE; - xdrs->x_op = XDR_DECODE; -diff -rup a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c ---- a/sunrpc/svc_unix.c 2012-05-31 20:37:43.000000000 -0600 -+++ b/sunrpc/svc_unix.c 2012-06-05 11:30:36.495612770 -0600 -@@ -46,6 +46,7 @@ - #include - #include - #include -+#include - #include - - /* -@@ -244,6 +245,11 @@ again: - { - if (errno == EINTR) - goto again; -+ if (errno == EMFILE) -+ { -+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; -+ __nanosleep(&ts , NULL); -+ } - return FALSE; - } - /* diff --git a/glibc-rh769421.patch b/glibc-rh769421.patch deleted file mode 100644 index dd03490..0000000 --- a/glibc-rh769421.patch +++ /dev/null @@ -1,217 +0,0 @@ -diff -Nrup c/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S d/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S ---- c/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-05-20 23:58:20.732670548 -0600 -+++ d/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-05-20 23:58:52.667518135 -0600 -@@ -137,7 +137,6 @@ __pthread_cond_wait: - 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 @@ __pthread_cond_wait: - 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 -@@ -398,78 +394,6 @@ __pthread_cond_wait: - #endif - 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 -- -- /* 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) -@@ -642,10 +566,6 @@ __condvar_w_cleanup: - .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 -Nrup c/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S d/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S ---- c/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-05-20 23:58:20.736670528 -0600 -+++ d/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-05-21 00:01:39.870720001 -0600 -@@ -136,14 +136,11 @@ __pthread_cond_wait: - 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 -@@ -331,69 +328,6 @@ __pthread_cond_wait: - 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 -- LP_OP(cmp) $-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 -- -- /* 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 -- LP_OP(cmp) $-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 -- mov dep_mutex(%rdi), %R8_LP -- 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) -@@ -546,15 +480,11 @@ __condvar_cleanup1: - .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: - - diff --git a/glibc-rh770869.patch b/glibc-rh770869.patch index 8757641..f9c3a3b 100644 --- a/glibc-rh770869.patch +++ b/glibc-rh770869.patch @@ -21,3 +21,101 @@ diff -rup a/fedora/nscd.service b/fedora/nscd.service [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': diff --git a/glibc-rh783979.patch b/glibc-rh783979.patch new file mode 100644 index 0000000..7540525 --- /dev/null +++ b/glibc-rh783979.patch @@ -0,0 +1,12 @@ +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 diff --git a/glibc-rh784402.patch b/glibc-rh784402.patch new file mode 100644 index 0000000..5e783f5 --- /dev/null +++ b/glibc-rh784402.patch @@ -0,0 +1,144 @@ +commit 3e1aa84e7f9f38815f5db9cd7654b1a9497cf6e4 +Author: Ulrich Drepper +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 , 2004. + +@@ -514,8 +514,9 @@ next_nip: + if (fd != -1) + TEMP_FAILURE_RETRY (send (fd, ¬found, 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 , 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 , 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 , 2004. + +@@ -202,8 +202,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, + written = TEMP_FAILURE_RETRY (send (fd, ¬found, 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 , 1998. + +@@ -124,8 +124,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req, + written = TEMP_FAILURE_RETRY (send (fd, ¬found, 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 , 2007. + +@@ -108,8 +108,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req, + written = TEMP_FAILURE_RETRY (send (fd, ¬found, 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) diff --git a/glibc-rh788989-2.patch b/glibc-rh788989-2.patch deleted file mode 100644 index 50c59f8..0000000 --- a/glibc-rh788989-2.patch +++ /dev/null @@ -1,159 +0,0 @@ -2012-04-12 Jeff Law - - * nscd/grpcache.c (cache_addgr): Track alloca usage with alloca_account. - Do not allocate DATASET on the stack if it's too large. Free DATASET - if needed. - -diff -rcp a/nscd/grpcache.c b/nscd/grpcache.c -*** a/nscd/grpcache.c Wed Apr 11 12:50:07 2012 ---- b/nscd/grpcache.c Wed Apr 11 21:45:58 2012 -*************** cache_addgr (struct database_dyn *db, in -*** 178,184 **** - char *cp; - const size_t key_len = strlen (key); - const size_t buf_len = 3 * sizeof (grp->gr_gid) + key_len + 1; -! char *buf = alloca (buf_len); - ssize_t n; - size_t cnt; - ---- 178,185 ---- - char *cp; - const size_t key_len = strlen (key); - const size_t buf_len = 3 * sizeof (grp->gr_gid) + key_len + 1; -! size_t alloca_used = 0; -! char *buf = alloca_account (buf_len, alloca_used); - ssize_t n; - size_t cnt; - -*************** cache_addgr (struct database_dyn *db, in -*** 190,196 **** - /* Determine the length of all members. */ - while (grp->gr_mem[gr_mem_cnt]) - ++gr_mem_cnt; -! gr_mem_len = (uint32_t *) alloca (gr_mem_cnt * sizeof (uint32_t)); - for (gr_mem_cnt = 0; grp->gr_mem[gr_mem_cnt]; ++gr_mem_cnt) - { - gr_mem_len[gr_mem_cnt] = strlen (grp->gr_mem[gr_mem_cnt]) + 1; ---- 191,198 ---- - /* Determine the length of all members. */ - while (grp->gr_mem[gr_mem_cnt]) - ++gr_mem_cnt; -! gr_mem_len = (uint32_t *) alloca_account (gr_mem_cnt * sizeof (uint32_t), -! alloca_used); - for (gr_mem_cnt = 0; grp->gr_mem[gr_mem_cnt]; ++gr_mem_cnt) - { - gr_mem_len[gr_mem_cnt] = strlen (grp->gr_mem[gr_mem_cnt]) + 1; -*************** cache_addgr (struct database_dyn *db, in -*** 205,214 **** - change. Allocate memory on the cache since it is likely - discarded anyway. If it turns out to be necessary to have a - new record we can still allocate real memory. */ -! bool alloca_used = false; - dataset = NULL; - -! if (he == NULL) - dataset = (struct dataset *) mempool_alloc (db, total + n, 1); - - if (dataset == NULL) ---- 207,216 ---- - change. Allocate memory on the cache since it is likely - discarded anyway. If it turns out to be necessary to have a - new record we can still allocate real memory. */ -! bool dataset_in_stack_or_freed = false; - dataset = NULL; - -! if (he == NULL || ! __libc_use_alloca (alloca_used + total + n)) - dataset = (struct dataset *) mempool_alloc (db, total + n, 1); - - if (dataset == NULL) -*************** cache_addgr (struct database_dyn *db, in -*** 216,225 **** - /* We cannot permanently add the result in the moment. But - we can provide the result as is. Store the data in some - temporary memory. */ -! dataset = (struct dataset *) alloca (total + n); - - /* We cannot add this record to the permanent database. */ -! alloca_used = true; - } - - dataset->head.allocsize = total + n; ---- 218,227 ---- - /* We cannot permanently add the result in the moment. But - we can provide the result as is. Store the data in some - temporary memory. */ -! dataset = (struct dataset *) alloca_account (total + n, alloca_used); - - /* We cannot add this record to the permanent database. */ -! dataset_in_stack_or_freed = true; - } - - dataset->head.allocsize = total + n; -*************** cache_addgr (struct database_dyn *db, in -*** 273,278 **** ---- 275,288 ---- - allocated on the stack and need not be freed. */ - dh->timeout = dataset->head.timeout; - ++dh->nreloads; -+ -+ /* If the new record was not allocated on the stack, then it must -+ be freed. Note that it can no longer be used. */ -+ if (! dataset_in_stack_or_freed) -+ { -+ free (dataset); -+ dataset_in_stack_or_freed = true; -+ } - } - else - { -*************** cache_addgr (struct database_dyn *db, in -*** 288,294 **** - key_copy = (char *) newp + (key_copy - (char *) dataset); - - dataset = memcpy (newp, dataset, total + n); -! alloca_used = false; - } - - /* Mark the old record as obsolete. */ ---- 298,304 ---- - key_copy = (char *) newp + (key_copy - (char *) dataset); - - dataset = memcpy (newp, dataset, total + n); -! dataset_in_stack_or_freed = false; - } - - /* Mark the old record as obsolete. */ -*************** cache_addgr (struct database_dyn *db, in -*** 303,309 **** - assert (fd != -1); - - #ifdef HAVE_SENDFILE -! if (__builtin_expect (db->mmap_used, 1) && !alloca_used) - { - assert (db->wr_fd != -1); - assert ((char *) &dataset->resp > (char *) db->data); ---- 313,319 ---- - assert (fd != -1); - - #ifdef HAVE_SENDFILE -! if (__builtin_expect (db->mmap_used, 1) && !dataset_in_stack_or_freed) - { - assert (db->wr_fd != -1); - assert ((char *) &dataset->resp > (char *) db->data); -*************** cache_addgr (struct database_dyn *db, in -*** 330,336 **** - - /* Add the record to the database. But only if it has not been - stored on the stack. */ -! if (! alloca_used) - { - /* If necessary, we also propagate the data to disk. */ - if (db->persistent) ---- 340,346 ---- - - /* Add the record to the database. But only if it has not been - stored on the stack. */ -! if (! dataset_in_stack_or_freed) - { - /* If necessary, we also propagate the data to disk. */ - if (db->persistent) diff --git a/glibc-rh789238-2.patch b/glibc-rh789238-2.patch deleted file mode 100644 index 91e8df7..0000000 --- a/glibc-rh789238-2.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff -rup c/malloc/arena.c d/malloc/arena.c ---- c/malloc/arena.c 2012-04-02 21:21:08.842818529 -0600 -+++ d/malloc/arena.c 2012-04-02 21:22:25.943306724 -0600 -@@ -121,14 +121,14 @@ int __malloc_initialized = -1; - if(ptr) \ - (void)mutex_lock(&ptr->mutex); \ - else \ -- ptr = arena_get2(ptr, (size)); \ -+ ptr = arena_get2(ptr, (size), false); \ - } while(0) - #else - # define arena_lock(ptr, size) do { \ - if(ptr && !mutex_trylock(&ptr->mutex)) { \ - THREAD_STAT(++(ptr->stat_lock_direct)); \ - } else \ -- ptr = arena_get2(ptr, (size)); \ -+ ptr = arena_get2(ptr, (size), false); \ - } while(0) - #endif - -@@ -782,7 +782,7 @@ get_free_list (void) - - - static mstate --reused_arena (void) -+reused_arena (bool retrying) - { - mstate result; - static mstate next_to_use; -@@ -799,6 +799,15 @@ reused_arena (void) - } - while (result != next_to_use); - -+ /* If we are retrying due to a failure to allocate in the main -+ arena, don't wait for the main arena to become available, select -+ another. -+ -+ To really fix this right we would have to try the allocation -+ in every other arena, but that seems like severe overkill. */ -+ if (retrying && result == &main_arena) -+ result = result->next; -+ - /* No arena available. Wait for the next in line. */ - (void)mutex_lock(&result->mutex); - -@@ -813,7 +822,7 @@ reused_arena (void) - - static mstate - internal_function --arena_get2(mstate a_tsd, size_t size) -+arena_get2(mstate a_tsd, size_t size, bool retrying) - { - mstate a; - -@@ -858,7 +867,7 @@ arena_get2(mstate a_tsd, size_t size) - catomic_decrement (&narenas); - } - else -- a = reused_arena (); -+ a = reused_arena (retrying); - } - #else - if(!a_tsd) -diff -rup c/malloc/malloc.c d/malloc/malloc.c ---- c/malloc/malloc.c 2012-04-02 21:21:08.984817776 -0600 -+++ d/malloc/malloc.c 2012-04-02 21:21:39.533655779 -0600 -@@ -2938,7 +2938,7 @@ public_mALLOc(size_t bytes) - /* ... or sbrk() has failed and there is still a chance to mmap() */ - mstate prev = ar_ptr->next ? ar_ptr : 0; - (void)mutex_unlock(&ar_ptr->mutex); -- ar_ptr = arena_get2(prev, bytes); -+ ar_ptr = arena_get2(prev, bytes, true); - if(ar_ptr) { - victim = _int_malloc(ar_ptr, bytes); - (void)mutex_unlock(&ar_ptr->mutex); -@@ -3117,7 +3117,7 @@ public_mEMALIGn(size_t alignment, size_t - /* ... or sbrk() has failed and there is still a chance to mmap() */ - mstate prev = ar_ptr->next ? ar_ptr : 0; - (void)mutex_unlock(&ar_ptr->mutex); -- ar_ptr = arena_get2(prev, bytes); -+ ar_ptr = arena_get2(prev, bytes, true); - if(ar_ptr) { - p = _int_memalign(ar_ptr, alignment, bytes); - (void)mutex_unlock(&ar_ptr->mutex); -@@ -3164,7 +3164,7 @@ public_vALLOc(size_t bytes) - /* ... or sbrk() has failed and there is still a chance to mmap() */ - mstate prev = ar_ptr->next ? ar_ptr : 0; - (void)mutex_unlock(&ar_ptr->mutex); -- ar_ptr = arena_get2(prev, bytes); -+ ar_ptr = arena_get2(prev, bytes, true); - if(ar_ptr) { - p = _int_memalign(ar_ptr, pagesz, bytes); - (void)mutex_unlock(&ar_ptr->mutex); -@@ -3211,7 +3211,7 @@ public_pVALLOc(size_t bytes) - /* ... or sbrk() has failed and there is still a chance to mmap() */ - mstate prev = ar_ptr->next ? ar_ptr : 0; - (void)mutex_unlock(&ar_ptr->mutex); -- ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE); -+ ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE, true); - if(ar_ptr) { - p = _int_memalign(ar_ptr, pagesz, rounded_bytes); - (void)mutex_unlock(&ar_ptr->mutex); -@@ -3298,7 +3298,7 @@ public_cALLOc(size_t n, size_t elem_size - /* ... or sbrk() has failed and there is still a chance to mmap() */ - mstate prev = av->next ? av : 0; - (void)mutex_unlock(&av->mutex); -- av = arena_get2(prev, sz); -+ av = arena_get2(prev, sz, true); - if(av) { - mem = _int_malloc(av, sz); - (void)mutex_unlock(&av->mutex); diff --git a/glibc-rh789238.patch b/glibc-rh789238.patch deleted file mode 100644 index 1801123..0000000 --- a/glibc-rh789238.patch +++ /dev/null @@ -1,115 +0,0 @@ -Only in b/malloc: arena.c.orig -Only in b/malloc: hooks.c.orig -diff -rup a/malloc/malloc.c b/malloc/malloc.c ---- a/malloc/malloc.c 2012-02-14 10:08:22.062534892 -0700 -+++ b/malloc/malloc.c 2012-02-14 10:19:43.088724473 -0700 -@@ -2936,8 +2936,9 @@ public_mALLOc(size_t bytes) - (void)mutex_unlock(&ar_ptr->mutex); - } else { - /* ... or sbrk() has failed and there is still a chance to mmap() */ -- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes); -- (void)mutex_unlock(&main_arena.mutex); -+ mstate prev = ar_ptr->next ? ar_ptr : 0; -+ (void)mutex_unlock(&ar_ptr->mutex); -+ ar_ptr = arena_get2(prev, bytes); - if(ar_ptr) { - victim = _int_malloc(ar_ptr, bytes); - (void)mutex_unlock(&ar_ptr->mutex); -@@ -3151,23 +3152,26 @@ public_vALLOc(size_t bytes) - if(!ar_ptr) - return 0; - p = _int_valloc(ar_ptr, bytes); -- (void)mutex_unlock(&ar_ptr->mutex); - if(!p) { - /* Maybe the failure is due to running out of mmapped areas. */ - if(ar_ptr != &main_arena) { -+ (void)mutex_unlock(&ar_ptr->mutex); - ar_ptr = &main_arena; - (void)mutex_lock(&ar_ptr->mutex); - p = _int_memalign(ar_ptr, pagesz, bytes); - (void)mutex_unlock(&ar_ptr->mutex); - } else { - /* ... or sbrk() has failed and there is still a chance to mmap() */ -- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes); -+ mstate prev = ar_ptr->next ? ar_ptr : 0; -+ (void)mutex_unlock(&ar_ptr->mutex); -+ ar_ptr = arena_get2(prev, bytes); - if(ar_ptr) { - p = _int_memalign(ar_ptr, pagesz, bytes); - (void)mutex_unlock(&ar_ptr->mutex); - } - } -- } -+ } else -+ (void)mutex_unlock(&ar_ptr->mutex); - assert(!p || chunk_is_mmapped(mem2chunk(p)) || - ar_ptr == arena_for_chunk(mem2chunk(p))); - -@@ -3195,24 +3199,26 @@ public_pVALLOc(size_t bytes) - - arena_get(ar_ptr, bytes + 2*pagesz + MINSIZE); - p = _int_pvalloc(ar_ptr, bytes); -- (void)mutex_unlock(&ar_ptr->mutex); - if(!p) { - /* Maybe the failure is due to running out of mmapped areas. */ - if(ar_ptr != &main_arena) { -+ (void)mutex_unlock(&ar_ptr->mutex); - ar_ptr = &main_arena; - (void)mutex_lock(&ar_ptr->mutex); - p = _int_memalign(ar_ptr, pagesz, rounded_bytes); - (void)mutex_unlock(&ar_ptr->mutex); - } else { - /* ... or sbrk() has failed and there is still a chance to mmap() */ -- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, -- bytes + 2*pagesz + MINSIZE); -+ mstate prev = ar_ptr->next ? ar_ptr : 0; -+ (void)mutex_unlock(&ar_ptr->mutex); -+ ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE); - if(ar_ptr) { - p = _int_memalign(ar_ptr, pagesz, rounded_bytes); - (void)mutex_unlock(&ar_ptr->mutex); - } - } -- } -+ } else -+ (void)mutex_unlock(&ar_ptr->mutex); - assert(!p || chunk_is_mmapped(mem2chunk(p)) || - ar_ptr == arena_for_chunk(mem2chunk(p))); - -@@ -3277,8 +3283,6 @@ public_cALLOc(size_t n, size_t elem_size - #endif - mem = _int_malloc(av, sz); - -- /* Only clearing follows, so we can unlock early. */ -- (void)mutex_unlock(&av->mutex); - - assert(!mem || chunk_is_mmapped(mem2chunk(mem)) || - av == arena_for_chunk(mem2chunk(mem))); -@@ -3286,21 +3290,23 @@ public_cALLOc(size_t n, size_t elem_size - if (mem == 0) { - /* Maybe the failure is due to running out of mmapped areas. */ - if(av != &main_arena) { -+ (void)mutex_unlock(&av->mutex); - (void)mutex_lock(&main_arena.mutex); - mem = _int_malloc(&main_arena, sz); - (void)mutex_unlock(&main_arena.mutex); - } else { - /* ... or sbrk() has failed and there is still a chance to mmap() */ -- (void)mutex_lock(&main_arena.mutex); -- av = arena_get2(av->next ? av : 0, sz); -- (void)mutex_unlock(&main_arena.mutex); -+ mstate prev = av->next ? av : 0; -+ (void)mutex_unlock(&av->mutex); -+ av = arena_get2(prev, sz); - if(av) { - mem = _int_malloc(av, sz); - (void)mutex_unlock(&av->mutex); - } - } - if (mem == 0) return 0; -- } -+ } else -+ (void)mutex_unlock(&av->mutex); - p = mem2chunk(mem); - - /* Two optional cases in which clearing not necessary */ diff --git a/glibc-rh790292.patch b/glibc-rh790292.patch deleted file mode 100644 index 4f1351d..0000000 --- a/glibc-rh790292.patch +++ /dev/null @@ -1,188 +0,0 @@ -diff -Nrup a/localedata/locales/sat_IN b/localedata/locales/sat_IN ---- a/localedata/locales/sat_IN 1969-12-31 17:00:00.000000000 -0700 -+++ b/localedata/locales/sat_IN 2012-02-14 09:45:55.072442697 -0700 -@@ -0,0 +1,184 @@ -+comment_char % -+escape_char / -+% Santali language locale for India. -+% Contributed by Mr. Pravin Satpute and Mr. Thakur Prasad Murmu -+ -+LC_IDENTIFICATION -+title "Santali language locale for India" -+source "Red Hat Pune" -+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 " -+contact "" -+email "bug-glibc-locales@gnu.org" -+tel "" -+fax "" -+language "Santali" -+territory "India" -+revision "1.0" -+date "2012-01-17" -+% -+category "sat_IN:2012";LC_IDENTIFICATION -+category "sat_IN:2012";LC_CTYPE -+category "sat_IN:2012";LC_COLLATE -+category "sat_IN:2012";LC_TIME -+category "sat_IN:2012";LC_NUMERIC -+category "sat_IN:2012";LC_MONETARY -+category "sat_IN:2012";LC_MESSAGES -+category "sat_IN:2012";LC_PAPER -+category "sat_IN:2012";LC_NAME -+category "sat_IN:2012";LC_ADDRESS -+category "sat_IN:2012";LC_TELEPHONE -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "hi_IN" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "hi_IN" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "hi_IN" -+END LC_MONETARY -+ -+ -+LC_NUMERIC -+copy "hi_IN" -+END LC_NUMERIC -+ -+ -+LC_TIME -+% This is the POSIX Locale definition for the LC_TIME category -+% generated by IBM Basic CountryPack Transformer. -+% These are generated based on XML base Locale definition file -+% for IBM Class for Unicode. -+% -+% Abbreviated weekday names (%a) -+abday "";"";/ -+ "";"";/ -+ "";/ -+ "";"" -+% -+ -+% Full weekday names (%A) -+day "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+% Abbreviated month names (%b) -+abmon "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+ -+% Full month names (%B) -+mon "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+% Equivalent of AM PM -+ -+am_pm "";"" -+ -+% -+% Appropriate date and time representation -+% %A %d %b %Y%I:%M:%S %Z -+d_t_fmt "/ -+/ -+" -+% -+% Appropriate date representation -+% %A %d %b %Y -+d_fmt "/ -+" -+% -+% Appropriate time representation -+% %I:%M:%S %Z -+t_fmt "/ -+" -+% -+% Appropriate 12 h time representation (%r) -+t_fmt_ampm "/ -+" -+% -+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y" -+date_fmt "/ -+/ -+" -+END LC_TIME -+ -+ -+LC_MESSAGES -+% This is the POSIX Locale definition for the LC_MESSAGES category -+% generated by IBM Basic CountryPack Transformer. -+% These are generated based on XML base Locale definition file -+% for IBM Class for Unicode. -+% -+% ^(Yes|[yY]) -+yesexpr "/ -+" -+% -+% ^(No|[nN]) -+noexpr "/ -+" -+% -+END LC_MESSAGES -+ -+ -+LC_PAPER -+copy "hi_IN" -+END LC_PAPER -+ -+ -+LC_NAME -+% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category -+% generated by IBM Basic CountryPack Transformer. -+% -+% -+name_fmt "/ -+" -+name_gen "" -+name_mr "" -+name_mrs "" -+name_miss "" -+name_ms "" -+ -+END LC_NAME -+ -+ -+LC_ADDRESS -+copy "hi_IN" -+END LC_ADDRESS -+ -+ -+LC_TELEPHONE -+copy "hi_IN" -+END LC_TELEPHONE -+ -+ -+LC_MEASUREMENT -+copy "hi_IN" -+END LC_MEASUREMENT diff --git a/glibc-rh790298.patch b/glibc-rh790298.patch deleted file mode 100644 index 92bf620..0000000 --- a/glibc-rh790298.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff -Nrup a/localedata/locales/mni_IN b/localedata/locales/mni_IN ---- a/localedata/locales/mni_IN 1969-12-31 17:00:00.000000000 -0700 -+++ b/localedata/locales/mni_IN 2012-02-14 09:49:33.059129964 -0700 -@@ -0,0 +1,172 @@ -+comment_char % -+escape_char / -+% Manipuri language locale for India. -+% Contributed by Mr. Pravin Satpute and Ms. Rebika Devi < rebika_srd AT rediffmail DOT com> -+ -+LC_IDENTIFICATION -+title "Manipuri language locale for India" -+source "Red Hat Pune" -+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 " -+contact "" -+email "bug-glibc-locales@gnu.org" -+tel "" -+fax "" -+language "Manipuri" -+territory "India" -+revision "1.0" -+date "2012-01-17" -+% -+category "mni_IN:2012";LC_IDENTIFICATION -+category "mni_IN:2012";LC_CTYPE -+category "mni_IN:2012";LC_COLLATE -+category "mni_IN:2012";LC_TIME -+category "mni_IN:2012";LC_NUMERIC -+category "mni_IN:2012";LC_MONETARY -+category "mni_IN:2012";LC_MESSAGES -+category "mni_IN:2012";LC_PAPER -+category "mni_IN:2012";LC_NAME -+category "mni_IN:2012";LC_ADDRESS -+category "mni_IN:2012";LC_TELEPHONE -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "bn_IN" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "bn_IN" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "bn_IN" -+END LC_MONETARY -+ -+ -+LC_NUMERIC -+copy "bn_IN" -+END LC_NUMERIC -+ -+ -+LC_TIME -+% This is the POSIX Locale definition for the LC_TIME category -+% generated by IBM Basic CountryPack Transformer. -+% These are generated based on XML base Locale definition file -+% for IBM Class for Unicode. -+% -+% Abbreviated weekday names (%a) -+abday "";"";/ -+ "";"";/ -+ "";/ -+ "";"" -+% -+ -+% Full weekday names (%A) -+day "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+% Abbreviated month names (%b) -+abmon "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+ -+% Full month names (%B) -+mon "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+% Equivalent of AM PM -+ -+am_pm "";/ -+ "" -+% -+% Appropriate date and time representation -+% %A %d %b %Y%I:%M:%S %Z -+d_t_fmt "/ -+/ -+" -+% -+% Appropriate date representation -+% %A %d %b %Y -+d_fmt "/ -+" -+% -+% Appropriate time representation -+% %I:%M:%S %Z -+t_fmt "/ -+" -+% -+% Appropriate 12 h time representation (%r) -+t_fmt_ampm "/ -+" -+% -+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y" -+date_fmt "/ -+/ -+" -+END LC_TIME -+ -+ -+LC_MESSAGES -+copy "en_IN" -+END LC_MESSAGES -+ -+ -+LC_PAPER -+copy "bn_IN" -+END LC_PAPER -+ -+ -+LC_NAME -+% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category -+% generated by IBM Basic CountryPack Transformer. -+% -+% -+name_fmt "/ -+" -+name_gen "" -+name_mr "" -+name_mrs "" -+name_miss "" -+name_ms "" -+ -+END LC_NAME -+ -+ -+LC_ADDRESS -+copy "bn_IN" -+END LC_ADDRESS -+ -+ -+LC_TELEPHONE -+copy "bn_IN" -+END LC_TELEPHONE -+ -+ -+LC_MEASUREMENT -+copy "bn_IN" -+END LC_MEASUREMENT diff --git a/glibc-rh791161.patch b/glibc-rh791161.patch deleted file mode 100644 index 1c1fab0..0000000 --- a/glibc-rh791161.patch +++ /dev/null @@ -1,180 +0,0 @@ -diff -Nrup a/localedata/locales/doi_IN b/localedata/locales/doi_IN ---- a/localedata/locales/doi_IN 1969-12-31 17:00:00.000000000 -0700 -+++ b/localedata/locales/doi_IN 2012-02-16 09:14:08.215572109 -0700 -@@ -0,0 +1,176 @@ -+comment_char % -+escape_char / -+% Dogri language locale for India. -+% Contributed by Pravin Satpute and Sushil Badyal -+ -+LC_IDENTIFICATION -+title "Dogri language locale for India" -+source "Red Hat Pune" -+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 " -+contact "" -+email "bug-glibc-locales@gnu.org" -+tel "" -+fax "" -+language "Dogri" -+territory "India" -+revision "1.0" -+date "2012-02-16" -+% -+category "doi_IN:2012";LC_IDENTIFICATION -+category "doi_IN:2012";LC_CTYPE -+category "doi_IN:2012";LC_COLLATE -+category "doi_IN:2012";LC_TIME -+category "doi_IN:2012";LC_NUMERIC -+category "doi_IN:2012";LC_MONETARY -+category "doi_IN:2012";LC_MESSAGES -+category "doi_IN:2012";LC_PAPER -+category "doi_IN:2012";LC_NAME -+category "doi_IN:2012";LC_ADDRESS -+category "doi_IN:2012";LC_TELEPHONE -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "hi_IN" -+END LC_CTYPE -+ -+LC_COLLATE -+ -+% Copy the template from ISO/IEC 14651 -+copy "iso14651_t1" -+ -+END LC_COLLATE -+ -+LC_MONETARY -+copy "hi_IN" -+END LC_MONETARY -+ -+ -+LC_NUMERIC -+copy "hi_IN" -+END LC_NUMERIC -+ -+ -+LC_TIME -+% This is the POSIX Locale definition for the LC_TIME category. -+% These are generated based on XML base Locale definition file -+% for IBM Class for Unicode/Java -+% -+% Abbreviated weekday names (%a) -+abday "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+% Full weekday names (%A) -+day "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+% Abbreviated month names (%b) -+abmon "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";"";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+% Full month names (%B) -+mon "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";"";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+% -+% Equivalent of AM PM -+am_pm "";/ -+ "" -+% -+% Appropriate date and time representation -+% %A %d %b %Y%I:%M:%S %Z -+d_t_fmt "/ -+/ -+" -+% -+% Appropriate date representation -+% %A %d %b %Y -+d_fmt "/ -+" -+% -+% Appropriate time representation -+% %I:%M:%S %Z -+t_fmt "/ -+" -+% -+% Appropriate 12 h time representation (%r) -+t_fmt_ampm "/ -+" -+% -+date_fmt "/ -+/ -+" -+END LC_TIME -+ -+ -+LC_MESSAGES -+% ^(Yes|[yY]) -+yesexpr "/ -+" -+% -+% ^(No|[nN]) -+noexpr "/ -+" -+% -+END LC_MESSAGES -+ -+LC_PAPER -+copy "hi_IN" -+END LC_PAPER -+ -+ -+LC_NAME -+% This is the ISO_IEC TR14652 Locale definition for the -+% LC_NAME category. -+% -+name_fmt "/ -+" -+name_gen "" -+name_mr "" -+name_mrs "" -+name_miss "" -+name_ms "" -+ -+END LC_NAME -+ -+ -+ -+LC_ADDRESS -+copy "hi_IN" -+END LC_ADDRESS -+ -+ -+LC_TELEPHONE -+copy "hi_IN" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "hi_IN" -+END LC_MEASUREMENT diff --git a/glibc-rh800224.patch b/glibc-rh800224.patch deleted file mode 100644 index ce8234c..0000000 --- a/glibc-rh800224.patch +++ /dev/null @@ -1,78 +0,0 @@ - -2012-03-07 Jeff Law - - * 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. */ diff --git a/glibc-rh803286.patch b/glibc-rh803286.patch deleted file mode 100644 index d9f909c..0000000 --- a/glibc-rh803286.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -rup a/localedata/SUPPORTED b/localedata/SUPPORTED ---- a/localedata/SUPPORTED 2012-03-12 14:11:04.134056609 -0600 -+++ b/localedata/SUPPORTED 2012-03-14 20:59:39.993269235 -0600 -@@ -103,6 +103,7 @@ de_DE@euro/ISO-8859-15 \ - de_LU.UTF-8/UTF-8 \ - de_LU/ISO-8859-1 \ - de_LU@euro/ISO-8859-15 \ -+doi_IN/UTF-8 \ - dv_MV/UTF-8 \ - dz_BT/UTF-8 \ - el_GR.UTF-8/UTF-8 \ -@@ -298,6 +299,7 @@ mk_MK.UTF-8/UTF-8 \ - mk_MK/ISO-8859-5 \ - ml_IN/UTF-8 \ - mn_MN/UTF-8 \ -+mni_IN/UTF-8 \ - mr_IN/UTF-8 \ - ms_MY.UTF-8/UTF-8 \ - ms_MY/ISO-8859-1 \ -@@ -350,6 +352,7 @@ ru_UA.UTF-8/UTF-8 \ - ru_UA/KOI8-U \ - rw_RW/UTF-8 \ - sa_IN/UTF-8 \ -+sat_IN/UTF-8 \ - sc_IT/UTF-8 \ - sd_IN/UTF-8 \ - sd_IN@devanagari/UTF-8 \ diff --git a/glibc-rh804630.patch b/glibc-rh804630.patch deleted file mode 100644 index 75dbe94..0000000 --- a/glibc-rh804630.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -rup c/resolv/res_send.c d/resolv/res_send.c ---- c/resolv/res_send.c 2012-01-01 05:16:32.000000000 -0700 -+++ d/resolv/res_send.c 2012-03-30 12:39:30.862467628 -0600 -@@ -409,6 +409,7 @@ __libc_res_nsend(res_state statp, const - */ - if (EXT(statp).nsinit == 0) { - unsigned char map[MAXNS]; -+ unsigned int ext_total_nscount; - - memset (map, MAXNS, sizeof (map)); - for (n = 0; n < MAXNS; n++) { -@@ -422,8 +423,9 @@ __libc_res_nsend(res_state statp, const - } - } - n = statp->nscount; -- if (statp->nscount > EXT(statp).nscount) -- for (n = EXT(statp).nscount, ns = 0; -+ ext_total_nscount = EXT(statp).nscount + EXT(statp).nscount6; -+ if (statp->nscount > ext_total_nscount) -+ for (n = ext_total_nscount, ns = 0; - n < statp->nscount; n++) { - while (ns < MAXNS - && EXT(statp).nsmap[ns] != MAXNS) diff --git a/glibc-rh819430.patch b/glibc-rh819430.patch deleted file mode 100644 index 8af1f78..0000000 --- a/glibc-rh819430.patch +++ /dev/null @@ -1,78 +0,0 @@ -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. */ - diff --git a/glibc-rh825061.patch b/glibc-rh825061.patch deleted file mode 100644 index 54fae8b..0000000 --- a/glibc-rh825061.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 $( - - - * 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 diff --git a/glibc-stap-libm.patch b/glibc-stap-libm.patch deleted file mode 100644 index fd20b7f..0000000 --- a/glibc-stap-libm.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -rup c/sysdeps/ieee754/dbl-64/slowexp.c d/sysdeps/ieee754/dbl-64/slowexp.c ---- c/sysdeps/ieee754/dbl-64/slowexp.c 2012-05-20 19:47:38.000000000 -0600 -+++ d/sysdeps/ieee754/dbl-64/slowexp.c 2012-05-21 10:02:51.693957300 -0600 -@@ -30,6 +30,8 @@ - #include "mpa.h" - #include - -+#include -+ - #ifndef SECTION - # define SECTION - #endif -@@ -60,12 +62,21 @@ __slowexp(double x) { - __sub(&mpy,&mpcor,&mpz,p); - __mp_dbl(&mpw, &w, p); - __mp_dbl(&mpz, &z, p); -- if (w == z) return w; -+ if (w == z) { -+ /* Track how often we get to the slow exp code plus -+ its input/output values. */ -+ LIBC_PROBE (slowexp_p6, 2, &x, &w); -+ return w; -+ } - else { /* if calculating is not exactly */ - p = 32; - __dbl_mp(x,&mpx,p); - __mpexp(&mpx, &mpy, p); - __mp_dbl(&mpy, &res, p); -+ -+ /* Track how often we get to the uber-slow exp code plus -+ its input/output values. */ -+ LIBC_PROBE (slowexp_p32, 2, &x, &res); - return res; - } - } -diff -rup c/sysdeps/ieee754/dbl-64/slowpow.c d/sysdeps/ieee754/dbl-64/slowpow.c ---- c/sysdeps/ieee754/dbl-64/slowpow.c 2012-05-20 19:47:38.000000000 -0600 -+++ d/sysdeps/ieee754/dbl-64/slowpow.c 2012-05-21 10:02:51.694957291 -0600 -@@ -34,6 +34,8 @@ - #include "mpa.h" - #include - -+#include -+ - #ifndef SECTION - # define SECTION - #endif -@@ -65,7 +67,12 @@ __slowpow(double x, double y, double z) - __mp_dbl(&mpr, &res, p); - __sub(&mpp,&eps,&mpr1,p); /* pp -eps =r1 */ - __mp_dbl(&mpr1, &res1, p); /* converting into double precision */ -- if (res == res1) return res; -+ if (res == res1) { -+ /* Track how often we get to the slow pow code plus -+ its input/output values. */ -+ LIBC_PROBE (slowpow_p6, 4, &x, &y, &z, &res); -+ return res; -+ } - - p = 32; /* if we get here result wasn't calculated exactly, continue */ - __dbl_mp(x,&mpx,p); /* for more exact calculation */ -@@ -75,5 +82,10 @@ __slowpow(double x, double y, double z) - __mul(&mpy,&mpz,&mpw,p); /* y*z =w */ - __mpexp(&mpw, &mpp, p); /* e^w=pp */ - __mp_dbl(&mpp, &res, p); /* converting into double precision */ -+ -+ /* Track how often we get to the uber-slow pow code plus -+ its input/output values. */ -+ LIBC_PROBE (slowpow_p32, 4, &x, &y, &z, &res); -+ - return res; - } diff --git a/glibc-stap.patch b/glibc-stap.patch index e52e020..b3ff9fa 100644 --- a/glibc-stap.patch +++ b/glibc-stap.patch @@ -1,12 +1,567 @@ -diff -Nrup c/scripts/check-local-headers.sh d/scripts/check-local-headers.sh ---- c/scripts/check-local-headers.sh 2012-05-20 19:47:38.000000000 -0600 -+++ d/scripts/check-local-headers.sh 2012-05-20 23:54:51.258670072 -0600 -@@ -28,7 +28,7 @@ exec ${AWK} -v includedir="$includedir" +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))" +- "/(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 + #include + #include ++#include + + .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 + #include "bp-sym.h" + #include "bp-asm.h" ++#include + + #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 + #include "bp-sym.h" + #include "bp-asm.h" ++#include + + #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 + #include "bp-sym.h" + #include "bp-asm.h" ++#include + + #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 + #include + #include ++#include + + + .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 + #include + #include ++#include + + .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 + #include + #include ++#include + + /* 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 + #include + #include ++#include + + 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 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 ++ ++/* 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 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 ++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 ++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 diff --git a/glibc-sw13618-2.patch b/glibc-sw13618-2.patch new file mode 100644 index 0000000..bb4b06e --- /dev/null +++ b/glibc-sw13618-2.patch @@ -0,0 +1,28 @@ +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; diff --git a/glibc-sw13618.patch b/glibc-sw13618.patch new file mode 100644 index 0000000..6202deb --- /dev/null +++ b/glibc-sw13618.patch @@ -0,0 +1,267 @@ +diff -Nrup a/Makeconfig b/Makeconfig +--- a/Makeconfig 2012-01-29 21:44:43.010328202 -0700 ++++ b/Makeconfig 2012-01-29 21:45:18.242344330 -0700 +@@ -950,6 +950,12 @@ libdl = + endif + endif + ++ifeq ($(build-shared),yes) ++libm = $(common-objpfx)math/libm.so$(libm.so-version) ++else ++libm = $(common-objpfx)math/libm.a ++endif ++ + # These are the subdirectories containing the library source. The order + # is more or less arbitrary. The sorting step will take care of the + # dependencies. +diff -Nrup a/elf/Makefile b/elf/Makefile +--- a/elf/Makefile 2012-01-29 21:44:43.087328238 -0700 ++++ b/elf/Makefile 2012-01-29 21:45:18.880344622 -0700 +@@ -124,7 +124,8 @@ distribute := rtld-Rules \ + tst-initordera1.c tst-initordera2.c tst-initorderb1.c \ + tst-initorderb2.c tst-initordera3.c tst-initordera4.c \ + tst-initorder.c \ +- tst-initorder2.c ++ tst-initorder2.c \ ++ tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c + + CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables + CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables +@@ -230,7 +231,7 @@ tests += loadtest restest1 preloadtest l + tst-audit1 tst-audit2 \ + tst-stackguard1 tst-addr1 tst-thrlock \ + tst-unique1 tst-unique2 tst-unique3 tst-unique4 \ +- tst-initorder tst-initorder2 ++ tst-initorder tst-initorder2 tst-relsort1 + # reldep9 + test-srcs = tst-pathopt + selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null) +@@ -293,7 +294,9 @@ modules-names = testobj1 testobj2 testob + tst-initordera1 tst-initorderb1 \ + tst-initordera2 tst-initorderb2 \ + tst-initordera3 tst-initordera4 \ +- tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d ++ tst-initorder2a tst-initorder2b tst-initorder2c \ ++ tst-initorder2d \ ++ tst-relsort1mod1 tst-relsort1mod2 + ifeq (yes,$(have-initfini-array)) + modules-names += tst-array2dep tst-array5dep + endif +@@ -1199,3 +1202,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS) + CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS) + CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS) + endif ++ ++$(objpfx)tst-relsort1: $(libdl) ++$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so ++$(objpfx)tst-relsort1mod2.so: $(libm) ++$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \ ++ $(objpfx)tst-relsort1mod2.so +diff -Nrup a/elf/dl-open.c b/elf/dl-open.c +--- a/elf/dl-open.c 2012-01-29 21:44:43.165328272 -0700 ++++ b/elf/dl-open.c 2012-01-29 21:55:06.683599515 -0700 +@@ -1,5 +1,5 @@ + /* Load a shared object at runtime, relocate it, and run its initializer. +- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc. ++ Copyright (C) 1996-2007, 2009, 2010, 2011, 2012 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 +@@ -304,53 +304,116 @@ dl_open_worker (void *a) + if (GLRO(dl_lazy)) + reloc_mode |= mode & RTLD_LAZY; + +- /* Relocate the objects loaded. We do this in reverse order so that copy +- relocs of earlier objects overwrite the data written by later objects. */ +- ++ /* Sort the objects by dependency for the relocation process. This ++ allows IFUNC relocations to work and it also means copy ++ relocation of dependencies are if necessary overwritten. */ ++ size_t nmaps = 0; + struct link_map *l = new; +- while (l->l_next) +- l = l->l_next; +- int relocation_in_progress = 0; +- while (1) ++ do + { + if (! l->l_real->l_relocated) ++ ++nmaps; ++ l = l->l_next; ++ } ++ while (l != NULL); ++ struct link_map *maps[nmaps]; ++ nmaps = 0; ++ l = new; ++ do ++ { ++ if (! l->l_real->l_relocated) ++ maps[nmaps++] = l; ++ l = l->l_next; ++ } ++ while (l != NULL); ++ if (nmaps > 1) ++ { ++ char seen[nmaps]; ++ memset (seen, '\0', nmaps); ++ size_t i = 0; ++ while (1) + { +- if (! relocation_in_progress) ++ ++seen[i]; ++ struct link_map *thisp = maps[i]; ++ ++ /* Find the last object in the list for which the current one is ++ a dependency and move the current object behind the object ++ with the dependency. */ ++ size_t k = nmaps - 1; ++ while (k > i) + { +- /* Notify the debugger that relocations are about to happen. */ +- LIBC_PROBE (rtld_reloc_start, 2, args->nsid, r); +- relocation_in_progress = 1; ++ struct link_map **runp = maps[k]->l_initfini; ++ if (runp != NULL) ++ /* Look through the dependencies of the object. */ ++ while (*runp != NULL) ++ if (__builtin_expect (*runp++ == thisp, 0)) ++ { ++ /* Move the current object to the back past the last ++ object with it as the dependency. */ ++ memmove (&maps[i], &maps[i + 1], ++ (k - i) * sizeof (maps[0])); ++ maps[k] = thisp; ++ ++ if (seen[i + 1] > 1) ++ { ++ ++i; ++ goto next_clear; ++ } ++ ++ char this_seen = seen[i]; ++ memmove (&seen[i], &seen[i + 1], ++ (k - i) * sizeof (seen[0])); ++ seen[k] = this_seen; ++ ++ goto next; ++ } ++ ++ --k; + } + ++ if (++i == nmaps) ++ break; ++ next_clear: ++ memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0])); ++ next:; ++ } ++ } ++ ++ int relocation_in_progress = 0; ++ for (size_t i = nmaps; i-- > 0; ) ++ { ++ l = maps[i]; ++ ++ 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)) ++ if (__builtin_expect (GLRO(dl_profile) != NULL, 0)) ++ { ++ /* If this here is the shared object which we want to profile ++ make sure the profile is started. We can find out whether ++ this is necessary or not by observing the `_dl_profile_map' ++ variable. If it was NULL but is not NULL afterwars we must ++ start the profiling. */ ++ struct link_map *old_profile_map = GL(dl_profile_map); ++ ++ _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1); ++ ++ if (old_profile_map == NULL && GL(dl_profile_map) != NULL) + { +- /* If this here is the shared object which we want to profile +- make sure the profile is started. We can find out whether +- this is necessary or not by observing the `_dl_profile_map' +- variable. If was NULL but is not NULL afterwars we must +- start the profiling. */ +- struct link_map *old_profile_map = GL(dl_profile_map); +- +- _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1); +- +- if (old_profile_map == NULL && GL(dl_profile_map) != NULL) +- { +- /* We must prepare the profiling. */ +- _dl_start_profile (); +- +- /* Prevent unloading the object. */ +- GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE; +- } ++ /* We must prepare the profiling. */ ++ _dl_start_profile (); ++ ++ /* Prevent unloading the object. */ ++ GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE; + } +- else +-#endif +- _dl_relocate_object (l, l->l_scope, reloc_mode, 0); + } +- +- if (l == new) +- break; +- l = l->l_prev; ++ else ++#endif ++ _dl_relocate_object (l, l->l_scope, reloc_mode, 0); + } + + /* If the file is not loaded now as a dependency, add the search +diff -Nrup a/elf/tst-relsort1.c b/elf/tst-relsort1.c +--- a/elf/tst-relsort1.c 1969-12-31 17:00:00.000000000 -0700 ++++ b/elf/tst-relsort1.c 2012-01-29 21:45:18.913344636 -0700 +@@ -0,0 +1,19 @@ ++#include ++#include ++ ++ ++static int ++do_test () ++{ ++ const char lib[] = "$ORIGIN/tst-relsort1mod1.so"; ++ void *h = dlopen (lib, RTLD_NOW); ++ if (h == NULL) ++ { ++ puts (dlerror ()); ++ return 1; ++ } ++ return 0; ++} ++ ++#define TEST_FUNCTION do_test () ++#include "../test-skeleton.c" +diff -Nrup a/elf/tst-relsort1mod1.c b/elf/tst-relsort1mod1.c +--- a/elf/tst-relsort1mod1.c 1969-12-31 17:00:00.000000000 -0700 ++++ b/elf/tst-relsort1mod1.c 2012-01-29 21:45:18.914344636 -0700 +@@ -0,0 +1,7 @@ ++extern int foo (double); ++ ++int ++bar (void) ++{ ++ return foo (1.2); ++} +diff -Nrup a/elf/tst-relsort1mod2.c b/elf/tst-relsort1mod2.c +--- a/elf/tst-relsort1mod2.c 1969-12-31 17:00:00.000000000 -0700 ++++ b/elf/tst-relsort1mod2.c 2012-01-29 21:45:18.914344636 -0700 +@@ -0,0 +1,7 @@ ++#include ++ ++int ++foo (double d) ++{ ++ return floor (d) != 0.0; ++} diff --git a/glibc.spec b/glibc.spec index 0c4d1cb..6dd691f 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,5 +1,5 @@ # CVS snapshots of glibc -%define RELEASE 1 +%define RELEASE 0 %if %{RELEASE} %define glibcsrcdir glibc-%{version} %define glibcportsdir glibc-%{version} @@ -22,7 +22,6 @@ %define libc_devel %mklibname -d c %define libc_static_devel %mklibname -d -s c %define multilibc libc%{libc_major} -%define api 2.16 %define _disable_ld_no_undefined 1 %undefine _fortify_cflags @@ -74,27 +73,27 @@ #----------------------------------------------------------------------- Summary: The GNU libc libraries Name: glibc -Version: 2.16.0 -Release: 1 +Version: 2.15 +Release: 3 Epoch: 6 License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ Group: System/Libraries Url: http://www.gnu.org/software/libc/ # FSF source -Source0: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz +Source0: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.gz %if %{RELEASE} -Source1: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz.sig +Source1: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.gz.sig %endif # Fedora tarball -Source2: %{glibcsrcdir}-fedora.tar.xz +Source2: %{glibcsrcdir}-fedora.tar.gz Source3: glibc-manpages.tar.bz2 Source5: glibc-check.sh -Source8: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.xz +Source8: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.gz %if %{RELEASE} -Source9: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.xz.sig +Source9: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.gz.sig %endif # Blowfish support @@ -119,6 +118,10 @@ BuildRequires: kernel-headers %if %{build_selinux} BuildRequires: libselinux-devel >= 1.17.10 %endif +# need linker for -Wl,--hash-style=both (>= 2.16.91.0.7-%{mkrel 6}) +# need gnu indirect function for multiarch (>= 2.19.51.0.14-1mnb2) +%define binutils_version 2.19.51.0.14-1mnb2 +BuildRequires: binutils >= %{binutils_version} # Old prelink versions breaks the system with glibc 2.11 Conflicts: prelink < 1:0.4.2-1.20091104.1mdv2010.1 @@ -137,18 +140,14 @@ BuildRequires: systemtap BuildRequires: nss-devel %endif BuildRequires: autoconf2.5 -BuildRequires: cap-devel +BuildRequires: libcap-devel +BuildRequires: rpm-mandriva-setup-build >= 1.133 +BuildRequires: rpm >= 1:5.4.4-20 +BuildRequires: spec-helper >= 0.31.2 #----------------------------------------------------------------------- # from fedora glibc.spec - -# -# Patches that are highly unlikely to ever be accepated upstream. -# -# Still needs to be broken down into individual patches Patch00: glibc-fedora.patch - -# Is this still necessary, if so, it needs to go upstream Patch01: glibc-stap.patch #----------------------------------------------------------------------- @@ -156,7 +155,7 @@ Patch01: glibc-stap.patch Patch02: glibc-2.11.1-localedef-archive-follow-symlinks.patch Patch03: glibc-2.15-fix-dns-with-broken-routers.patch Patch04: glibc-2.14.90-nss-upgrade.patch -Patch05: glibc-2.16.0-share-locale.patch +Patch05: glibc-2.9-share-locale.patch Patch06: glibc-2.3.6-nsswitch.conf.patch Patch07: glibc-2.2.4-xterm-xvt.patch Patch08: glibc-2.3.3-nscd-enable.patch @@ -167,12 +166,12 @@ Patch12: glibc-2.3.4-timezone.patch Patch13: glibc-2.10.1-biarch-cpp-defines.patch Patch14: glibc-2.8-ENOTTY-fr-translation.patch Patch15: glibc-2.3.5-biarch-utils.patch -Patch16: glibc-2.16.0-multiarch.patch -Patch17: glibc-2.16.0-i586-hptiming.patch +Patch16: glibc-2.15-multiarch.patch +Patch17: glibc-2.4.90-i586-hptiming.patch Patch18: glibc-2.3.4-i586-if-no-cmov.patch Patch19: glibc-2.3.6-pt_BR-i18nfixes.patch Patch20: glibc-2.4.90-testsuite-ldbl-bits.patch -Patch21: glibc-2.16.0-testsuite-rt-notparallel.patch +Patch21: glibc-2.4.90-testsuite-rt-notparallel.patch Patch22: glibc-2.13-fix-compile-error.patch # https://bugzilla.redhat.com/show_bug.cgi?id=638477#c275 @@ -185,112 +184,70 @@ Patch23: 0001-x86_64-fix-for-new-memcpy-behavior.patch Patch24: glibc-2.14.90-revert-fedora-not-installing-stream-headers.patch Patch25: glibc-no-leaf-attribute.patch -Patch26: glibc-2.16.0-string-format-fixes.patch +Patch26: glibc-2.14-394-g8f3b1ff-string-format-fixes.patch #----------------------------------------------------------------------- # from fedora glibc.spec -# Reverting an upstream patch. I don't think this has been discussed -# upstream yet. -Patch27: %{name}-rh769421.patch - -# Not likely to be accepted upstream -Patch28: %{name}-rh787201.patch - -# Not necessary to send upstream, fedora specific -Patch29: %{name}-rh688948.patch - -# Build info files in the source tree, then move to the build -# tree so that they're identical for multilib builds -Patch30: %{name}-rh825061.patch - -# stap, needs to be sent upstream -Patch31: %{name}-rh179072.patch - +# Uli wants to see this undergo more analyis (what happens when thread B calls into malloc when +# thread A has unlocked on the error path +# There's an alternate approach using mmap after detecting an error that needs discussion +Patch27: glibc-rh757881.patch +# From upstream. +Patch28: glibc-rh740506.patch +# Not sure of upstream status +Patch29: glibc-rh730856.patch +# Follow-on to 552960's original patch to avoid losing wakeups +Patch30: glibc-rh552960-2.patch +Patch31: glibc-rh729661.patch +Patch32: glibc-rh446078.patch +Patch33: glibc-rh454629.patch +Patch34: glibc-rh784402.patch +Patch35: glibc-rh622499.patch +# Depends on systemtap infrastructure, so can't go upstream +Patch36: glibc-rh179072.patch +Patch37: glibc-rh697421.patch +Patch38: glibc-rh740682.patch +Patch39: glibc-sw13618.patch +# Fix bogus sorting code which was copied from dl-deps. +Patch40: glibc-sw13618-2.patch +Patch41: glibc-rh783979.patch +# Needs to go upstream +Patch42: glibc-rh657588.patch +Patch43: glibc-rh787201.patch +# Sent upstream, awaiting feedback +Patch44: glibc-rh741105.patch +# Sent upstream, awaiting feedback +Patch45: glibc-rh770869.patch +# Sent upstream, awaiting feedback +Patch46: glibc-rh691912.patch +# Not necessary to send upstream +Patch47: glibc-rh688948.patch +# Rakesh & Pravin will send upstream +Patch48: glibc-rh770439.patch +# Sent upstream +Patch49: glibc-rh789209.patch +# Was acked in the upstream BZ, but patch never got installed +Patch50: glibc-rh624296.patch # Needs to be sent upstream -Patch32: %{name}-rh697421.patch - -# Needs to be sent upstream -Patch33: %{name}-2.16.0-rh740682.patch - -# Needs to be sent upstream -Patch34: %{name}-rh657588.patch - -# Needs to be sent upstream -Patch35: %{name}-rh564528.patch - -# stap, needs to be sent upstream -Patch36: %{name}-stap-libm.patch - -# -# Patches submitted, but not yet approved upstream. -# Each should be associated with a BZ. -# Obviously we're not there right now, but that's the goal -# - -Patch37: %{name}-rh757881.patch - -# Upstream BZ 13013 -Patch38: %{name}-rh730856.patch - -Patch39: %{name}-rh741105.patch -Patch40: %{name}-rh770869.patch -Patch41: %{name}-rh770439.patch -Patch42: %{name}-rh789209.patch -Patch43: %{name}-rh691912.patch - -# Upstream BZ 13604 -Patch44: %{name}-rh790292.patch - -# Upstream BZ 13603 -Patch45: %{name}-rh790298.patch - -# Upstream BZ 13698 -Patch46: %{name}-rh791161.patch - -# Upstream BZ 12377 -#Patch47: %{name}-rh697149.patch - -# Upstream BZ 9954 -Patch48: %{name}-rh739743.patch - -# Upstream BZ 13939 -Patch49: %{name}-rh789238.patch - -#Upstream BZ 13818 -Patch50: %{name}-rh800224.patch - -# Upstream BZ 14247 -Patch51: %{name}-rh827510.patch - -Patch52: %{name}-rh803286.patch - - -# Upstream BZ 13939 -Patch53: %{name}-rh789238-2.patch - -# Upstream BZ 13761 -Patch54: %{name}-rh788989-2.patch - -# Upstream BZ 13027 -Patch55: %{name}-rh804630.patch - -# Upstream BZ 14185 -Patch56: %{name}-rh819430.patch - -# See http://sourceware.org/ml/libc-alpha/2012-06/msg00074.html -Patch57: %{name}-rh767693-2.patch +Patch51: glibc-rh564528.patch #----------------------------------------------------------------------- # mandriva patches -Patch58: glibc-2.10.1-mdv-avx-owl-crypt.patch -Patch59: glibc-2.10.1-mdv-owl-crypt_freesec.patch +Patch52: glibc-2.10.1-mdv-avx-owl-crypt.patch +Patch53: glibc-2.10.1-mdv-owl-crypt_freesec.patch -Patch60: glibc-2.16.0-avx-relocate_fcrypt.patch -Patch61: glibc-2.16.0-avx-increase_BF_FRAME.patch -Patch62: glibc-2.16.0-mdv-wrapper_handle_sha.patch +Patch54: glibc-2.9-avx-relocate_fcrypt.patch +Patch55: glibc-2.3.6-avx-increase_BF_FRAME.patch +Patch56: glibc-2.7-mdv-wrapper_handle_sha.patch # Requires to link thumb mode build -Patch63: glibc-2.14-arm-thumb.patch +Patch57: glibc-2.14-arm-thumb.patch + +# FIXME this patch is hackish but corrects the problem for me +# in upstream bugreport, what others apparently did was to +# revert 3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6 +# http://sourceware.org/bugzilla/show_bug.cgi?id=13594 +Patch58: glibc-2.15-chromium-browser-crash.patch # Determine minimum kernel versions (rhbz#619538) %define enablekernel 2.6.32 @@ -344,7 +301,7 @@ Linux system will not function. %exclude %{_prefix}/libexec/getconf/XBS5_ILP32_OFF32 %exclude %{_prefix}/libexec/getconf/XBS5_ILP32_OFFBIG %endif -%{_slibdir}/ld-%{api}.so +%{_slibdir}/ld-%{version}.so %ifarch %{ix86} %{_slibdir}/ld-linux.so.2 %{_slibdir}/i686 @@ -413,7 +370,7 @@ library and the standard math library. Without these two libraries, a Linux system will not function. %files -n %{multilibc} -%{_slibdir32}/ld-%{api}.so +%{_slibdir32}/ld-%{version}.so %{_slibdir32}/ld-linux*.so.2 %{_slibdir32}/lib*-[.0-9]*.so %{_slibdir32}/lib*.so.[0-9]* @@ -437,6 +394,10 @@ Linux system will not function. %package devel Summary: Header and object files for development using standard C libraries Group: Development/C +Requires(post): info-install +Requires(preun):info-install +Requires(post): coreutils +Requires(postun):coreutils, awk Requires: %{name} = %{EVRD} %if %{build_multiarch} Requires: %{multilibc} = %{EVRD} @@ -456,6 +417,12 @@ will use the standard C libraries, your system needs to have these standard header and object files available in order to create the executables. +%post devel + %_install_info libc.info + +%preun devel + %_remove_install_info libc.info + %files devel %{_mandir}/man3/* %{_infodir}/libc.info* @@ -665,7 +632,7 @@ These are configuration files that describe possible time zones. %patch19 -p1 %patch20 -p1 %patch21 -p1 -#patch22 -p0 +%patch22 -p0 %patch23 -p1 %patch24 -p1 %patch25 -p1 @@ -674,7 +641,7 @@ These are configuration files that describe possible time zones. %patch28 -p1 %patch29 -p1 %patch30 -p1 -#patch31 -p1 +%patch31 -p1 %patch32 -p1 %patch33 -p1 %patch34 -p1 @@ -690,32 +657,25 @@ These are configuration files that describe possible time zones. %patch44 -p1 %patch45 -p1 %patch46 -p1 -#patch47 -p1 +%patch47 -p1 %patch48 -p1 %patch49 -p1 %patch50 -p1 %patch51 -p1 -%patch52 -p1 -%patch53 -p1 -%patch54 -p1 -%patch55 -p1 -%patch56 -p1 -%patch57 -p1 -# FIXME: owl patches are incompatible with glibc-2.16 # copy freesec source -#cp %{SOURCE52} %{SOURCE53} crypt/ -#echo "Applying crypt_blowfish patch:" -#patch58 -p1 -#mv crypt/crypt.h crypt/gnu-crypt.h -#cp -a crypt_blowfish-%{crypt_bf_ver}/*.[chS] crypt/ +cp %{SOURCE52} %{SOURCE53} crypt/ +echo "Applying crypt_blowfish patch:" +%patch52 -p1 +mv crypt/crypt.h crypt/gnu-crypt.h +cp -a crypt_blowfish-%{crypt_bf_ver}/*.[chS] crypt/ ## FreeSec support for extended/new-style/BSDI hashes in crypt(3) -#patch59 -p1 -#patch60 -p1 -#patch61 -p1 +%patch53 -p1 +%patch54 -p1 +%patch55 -p0 # add sha256-crypt and sha512-crypt support to the Openwall wrapper -#patch62 -p0 +%patch56 -p1 %if %{build_selinux} # XXX kludge to build nscd with selinux support as it added -nostdinc @@ -725,9 +685,11 @@ These are configuration files that describe possible time zones. %if %{build_ports} mv %{glibcportsdir} ports -%patch63 -p1 +%patch57 -p1 %endif +%patch58 -p1 + find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \; # Remove patch backups from files we ship in glibc packages @@ -1053,14 +1015,14 @@ rm -rf %{buildroot}%{_includedir}/netatalk/ install -m 755 -d %{buildroot}%{_docdir}/glibc %if %{with doc} make -C build-%{_target_cpu}-linux html - cp -fpar build-%{product_arch}-linux/manual/libc %{buildroot}%{_docdir}/glibc/html + cp -fpar manual/libc %{buildroot}%{_docdir}/glibc/html %endif %if %{with pdf} make -C build-%{_target_cpu}-linux pdf - install -m644 -D build-%{product_arch}-linux/manual/libc.pdf %{buildroot}%{_docdir}/glibc/libc.pdf + install -m644 -D manual/libc.pdf %{buildroot}%{_docdir}/glibc/libc.pdf %endif -install -m 644 COPYING COPYING.LIB README NEWS INSTALL BUGS \ - PROJECTS CONFORMANCE hesiod/README.hesiod LICENSES \ +install -m 644 COPYING COPYING.LIB README NEWS INSTALL FAQ BUGS \ + NOTES PROJECTS CONFORMANCE README.libm hesiod/README.hesiod \ ChangeLog* crypt/README.ufc-crypt nis/nss posix/gai.conf \ %{buildroot}%{_docdir}/glibc xz -0 --text %{buildroot}%{_docdir}/glibc/ChangeLog* @@ -1114,4 +1076,10 @@ rm -f %{buildroot}%{_infodir}/dir # This will make the '-g' argument to be passed to eu-strip for these libraries, so that # some info is kept that's required to make valgrind work without depending on glibc-debug # package to be installed. -export EXCLUDE_FROM_FULL_STRIP="ld-%{api}.so libpthread libc-%{api}.so libm-%{api}.so" +export EXCLUDE_FROM_FULL_STRIP="ld-%{version}.so libpthread libc-%{version}.so libm-%{version}.so" + + +%changelog +* Thu May 24 2012 Paulo Andrade 6:2.15-3 ++ Revision: 800481 +- Correct typo in libc6 post.