about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2011-06-17 14:29:11 +0200
committerAndreas Schwab <schwab@redhat.com>2011-06-17 14:29:45 +0200
commit7072e3c9988c12ebbcfa0ac02dd9930b7bb81d3c (patch)
tree6a5fa18ab2431af478c568a9076239ada94ddb7a
parentc1ddf2f3779eb43c486bc203e18afe843ddde5f6 (diff)
parent5babac1535735419921ca9edbf5f6c96a40296da (diff)
downloadglibc-7072e3c9988c12ebbcfa0ac02dd9930b7bb81d3c.tar.gz
glibc-7072e3c9988c12ebbcfa0ac02dd9930b7bb81d3c.tar.xz
glibc-7072e3c9988c12ebbcfa0ac02dd9930b7bb81d3c.zip
Merge remote-tracking branch 'origin/release/2.14/master' into fedora/2.14/master
-rw-r--r--ChangeLog70
-rw-r--r--NEWS4
-rw-r--r--manual/Makefile12
-rw-r--r--manual/fdl-1.1.texi (renamed from manual/fdl.texi)11
-rw-r--r--manual/lgpl-2.1.texi (renamed from manual/lesser.texi)42
-rw-r--r--manual/libc.texinfo10
-rw-r--r--nptl/ChangeLog4
-rw-r--r--nptl/pthread_rwlock_init.c3
-rw-r--r--resolv/res_send.c4
-rw-r--r--rt/bits/mqueue2.h12
-rw-r--r--stdlib/longlong.h2
-rw-r--r--sysdeps/posix/getaddrinfo.c2
-rw-r--r--sysdeps/sparc/sparc32/dl-irel.h5
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h8
-rw-r--r--sysdeps/sparc/sparc64/dl-irel.h5
-rw-r--r--sysdeps/sparc/sparc64/dl-machine.h8
-rw-r--r--sysdeps/sparc/sparc64/multiarch/memcpy.S22
-rw-r--r--sysdeps/sparc/sparc64/multiarch/memset.S36
-rw-r--r--sysdeps/unix/sysv/linux/check_native.c3
-rw-r--r--sysdeps/unix/sysv/linux/dl-osinfo.h2
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/dl-fxstatat64.c6
-rw-r--r--sysdeps/x86_64/multiarch/init-arch.c7
22 files changed, 153 insertions, 125 deletions
diff --git a/ChangeLog b/ChangeLog
index aa26f9c763..249b858033 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,73 @@
+2011-06-15  Ulrich Drepper  <drepper@gmail.com>
+
+	* resolv/res_send.c (__libc_res_nsend): Fix typos in last patch.  We
+	need to dereference resplen2.
+
+2011-06-14  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/unix/sysv/linux/wordsize-64/dl-fxstatat64.c: New file.
+
+2011-06-14  Andreas Jaeger  <aj@suse.de>
+
+	* sysdeps/unix/sysv/linux/check_native.c: Include <string.h> for
+	memset declaration.
+
+2011-06-10  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Fix logic allocating
+	tmpbuf.
+
+2011-06-07  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/sparc/sparc32/dl-irel.h (elf_irela): Pass dl_hwcap to
+	ifuncs.
+	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela,
+	elf_machine_lazy_rel): Likewise.
+	* sysdeps/sparc/sparc64/dl-irel.h (elf_irela): Likewise.
+	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela,
+	elf_machine_lazy_rel): Likewise.
+	* sysdeps/sparc/sparc64/multiarch/memcpy.S (memcpy): Fetch
+	dl_hwcap via passed in argument.
+	* sysdeps/sparc/sparc64/multiarch/memset.S (memset, bzero):
+	Likewise.
+
+2011-06-06  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* stdlib/longlong.h: Update from GCC.  Fix smul_ppmm for S/390.
+
+2011-06-06  Roland McGrath  <roland@hack.frob.com>
+
+	[BZ #12849]
+	* manual/fdl-1.1.texi: New file, verbatim from:
+	http://www.gnu.org/licenses/old-licenses/fdl-1.1.texi
+	* manual/lgpl-2.1.texi: New file, verbatim from:
+	http://www.gnu.org/licenses/old-licenses/lgpl-2.1.texi
+	* manual/Makefile (licenses): New variable, list those new file names.
+	(texis): Use it.
+	(chapters.% top-menu.%): Include $(licenses) with $(appendices).
+
+	* manual/fdl.texi: File removed.
+	* manual/lesser.texi: File removed.
+	* manual/libc.texinfo (Copying, Documentation License):
+	Use new @include file names, put @appendix directive before @include.
+
+2011-06-04  Jakub Jelinek  <jakub@redhat.com>
+
+	[BZ #12841]
+	* rt/bits/mqueue2.h (__mq_open_2): Add __THROW.
+	(__mq_open_alias): Use __REDIRECT_NTH instead of __REDIRECT.
+	(mq_open): Add __NTH.
+
+2011-06-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
+	Assume Intel Core i3/i5/i7 processor if AVX is available.
+
+2011-05-31  Ulrich Drepper  <drepper@gmail.com>
+
+	* sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard): Fix
+	typo.
+
 2011-05-31  Andreas Schwab  <schwab@redhat.com>
 
 	* nscd/nscd_getserv_r.c (nscd_getserv_r): Don't free non-malloced
diff --git a/NEWS b/NEWS
index c6be68c09d..8edf1d3852 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-5-30
+GNU C Library NEWS -- history of user-visible changes.  2011-6-4
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -18,7 +18,7 @@ Version 2.14
   12587, 12597, 12601, 12611, 12625, 12626, 12631, 12650, 12653, 12655,
   12660, 12671, 12681, 12684, 12685, 12711, 12713, 12714, 12717, 12723,
   12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792,
-  12795, 12811, 12813, 12814
+  12795, 12811, 12813, 12814, 12841
 
 * New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
   syncfs, setns, sendmmsg
diff --git a/manual/Makefile b/manual/Makefile
index b1f5fa73e5..46dd4304dc 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-1999,2000,2001,2002,2003,2004,2006
+# Copyright (C) 1992-1999,2000,2001,2002,2003,2004,2006,2011
 #	Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
@@ -59,11 +59,11 @@ chapters = $(addsuffix .texi, \
 		       resource setjmp signal startup process job nss	\
 		       users sysinfo conf crypt debug)
 add-chapters = $(wildcard $(foreach d, $(add-ons), ../$d/$d.texi))
-appendices = lang.texi header.texi install.texi maint.texi contrib.texi \
-	     freemanuals.texi
+appendices = lang.texi header.texi install.texi maint.texi contrib.texi
+licenses = freemanuals.texi lgpl-2.1.texi fdl-1.1.texi
 
 -include texis
-texis: texis.awk $(chapters) $(add-chapters) $(appendices) lesser.texi fdl.texi
+texis: texis.awk $(chapters) $(add-chapters) $(appendices) $(licenses)
 	$(AWK) -f $^ > $@.T
 	mv -f $@.T $@
 
@@ -73,7 +73,9 @@ examples = $(filter-out $(foreach d, $(add-ons), ../$d/%.c.texi), \
 
 # Kludge: implicit rule so Make knows the one command does it all.
 chapters.% top-menu.%: libc-texinfo.sh $(texis) Makefile
-	AWK=$(AWK) $(SHELL) $< '$(chapters)' '$(add-chapters)' '$(appendices)'
+	AWK=$(AWK) $(SHELL) $< '$(chapters)' \
+			       '$(add-chapters)' \
+			       '$(appendices) $(licenses)'
 
 libc.dvi libc.pdf libc.info: chapters.texi top-menu.texi dir-add.texi \
 			     libm-err.texi
diff --git a/manual/fdl.texi b/manual/fdl-1.1.texi
index b03f7b089b..f093d54c06 100644
--- a/manual/fdl.texi
+++ b/manual/fdl-1.1.texi
@@ -1,12 +1,12 @@
-
-@appendix GNU Free Documentation License
-
-@cindex FDL, GNU Free Documentation License
+@c The GNU Free Documentation License.
 @center Version 1.1, March 2000
 
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
 @display
 Copyright @copyright{} 2000 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
+51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
 
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
@@ -399,4 +399,3 @@ to permit their use in free software.
 @c Local Variables:
 @c ispell-local-pdict: "ispell-dict"
 @c End:
-
diff --git a/manual/lesser.texi b/manual/lgpl-2.1.texi
index b8c273f980..ab03d6cc37 100644
--- a/manual/lesser.texi
+++ b/manual/lgpl-2.1.texi
@@ -1,16 +1,12 @@
-@ifset lgpl-appendix
-@appendix GNU Lesser General Public License
-@end ifset
-@ifclear lgpl-appendix
-@unnumbered GNU Lesser General Public License
-@end ifclear
-
-@cindex LGPL, Lesser General Public License
+@c The GNU Lesser General Public License.
 @center Version 2.1, February 1999
 
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
 @display
 Copyright @copyright{} 1991, 1999 Free Software Foundation, Inc.
-59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
@@ -20,7 +16,7 @@ as the successor of the GNU Library Public License, version 2, hence the
 version number 2.1.]
 @end display
 
-@appendixsubsec Preamble
+@subheading Preamble
 
   The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
@@ -122,13 +118,7 @@ modification follow.  Pay close attention to the difference between a
 former contains code derived from the library, whereas the latter must
 be combined with the library in order to run.
 
-@iftex
-@appendixsubsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-@end iftex
-@ifinfo
-@center GNU LESSER GENERAL PUBLIC LICENSE
-@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-@end ifinfo
+@subheading TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
 @enumerate 0
 @item
@@ -480,12 +470,7 @@ decision will be guided by the two goals of preserving the free status
 of all derivatives of our free software and of promoting the sharing
 and reuse of software generally.
 
-@iftex
-@heading NO WARRANTY
-@end iftex
-@ifinfo
-@center NO WARRANTY
-@end ifinfo
+@center @b{NO WARRANTY}
 
 @item
 BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
@@ -511,15 +496,10 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGES.
 @end enumerate
 
-@iftex
-@heading END OF TERMS AND CONDITIONS
-@end iftex
-@ifinfo
-@center END OF TERMS AND CONDITIONS
-@end ifinfo
+@subheading END OF TERMS AND CONDITIONS
 
 @page
-@appendixsubsec How to Apply These Terms to Your New Libraries
+@subheading How to Apply These Terms to Your New Libraries
 
   If you develop a new library, and you want it to be of the greatest
 possible use to the public, we recommend making it free software that
@@ -548,7 +528,7 @@ Lesser General Public License for more details.
 
 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 USA.
 @end smallexample
 
diff --git a/manual/libc.texinfo b/manual/libc.texinfo
index 492c6ee6a4..72d99a8a79 100644
--- a/manual/libc.texinfo
+++ b/manual/libc.texinfo
@@ -30,7 +30,7 @@ This is Edition @value{EDITION}, last updated @value{UPDATED},
 of @cite{The GNU C Library Reference Manual}, for version @value{VERSION}.
 
 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
-2003, 2007, 2008, 2010 Free Software Foundation, Inc.
+2003, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -96,12 +96,14 @@ of the GNU C Library.
 @node Free Manuals, Copying, Contributors, Top
 @include freemanuals.texi
 
-@set lgpl-appendix
 @node Copying, Documentation License, Free Manuals, Top
-@include lesser.texi
+@appendix GNU Lesser General Public License
+@include lgpl-2.1.texi
 
 @node Documentation License, Concept Index, Copying, Top
-@include fdl.texi
+@appendix GNU Free Documentation License
+@cindex FDL, GNU Free Documentation License
+@include fdl-1.1.texi
 
 @node Concept Index, Type Index, Documentation License, Top
 @unnumbered Concept Index
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 104140f807..59c6945ab3 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,7 @@
+2011-06-14  Andreas Jaeger  <aj@suse.de>
+
+	* pthread_rwlock_init.c: Include <string.h> for memset declaration.
+
 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #386]
diff --git a/nptl/pthread_rwlock_init.c b/nptl/pthread_rwlock_init.c
index c0aa194107..9ecd48c347 100644
--- a/nptl/pthread_rwlock_init.c
+++ b/nptl/pthread_rwlock_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2007,2009,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -18,6 +18,7 @@
    02111-1307 USA.  */
 
 #include "pthreadP.h"
+#include <string.h>
 #include <kernel-features.h>
 
 
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 97142b7dd0..a001c1e753 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -549,7 +549,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
 				    ns, ansp, ansp2, nansp2, resplen2);
 			if (n < 0)
 				return (-1);
-			if (n == 0 && (buf2 == NULL || resplen2 == 0))
+			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
 				goto next_ns;
 		} else {
 			/* Use datagrams. */
@@ -559,7 +559,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
 				    ansp2, nansp2, resplen2);
 			if (n < 0)
 				return (-1);
-			if (n == 0 && (buf2 == NULL || resplen2 == 0))
+			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
 				goto next_ns;
 			if (v_circuit)
 			  // XXX Check whether both requests failed or
diff --git a/rt/bits/mqueue2.h b/rt/bits/mqueue2.h
index 4c90609e83..a6d0815722 100644
--- a/rt/bits/mqueue2.h
+++ b/rt/bits/mqueue2.h
@@ -1,5 +1,5 @@
 /* Checking macros for mq functions.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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,16 +25,18 @@
    parameter.  */
 extern mqd_t mq_open (__const char *__name, int __oflag, ...)
      __THROW __nonnull ((1));
-extern mqd_t __mq_open_2 (__const char *__name, int __oflag) __nonnull ((1));
-extern mqd_t __REDIRECT (__mq_open_alias, (__const char *__name, int __oflag, ...),
-			 mq_open) __nonnull ((1));
+extern mqd_t __mq_open_2 (__const char *__name, int __oflag)
+     __THROW __nonnull ((1));
+extern mqd_t __REDIRECT_NTH (__mq_open_alias, (__const char *__name,
+					       int __oflag, ...), mq_open)
+     __nonnull ((1));
 __errordecl (__mq_open_wrong_number_of_args,
 	     "mq_open can be called either with 2 or 4 arguments");
 __errordecl (__mq_open_missing_mode_and_attr,
 	     "mq_open with O_CREAT in second argument needs 4 arguments");
 
 __extern_always_inline mqd_t
-mq_open (__const char *__name, int __oflag, ...)
+__NTH (mq_open (__const char *__name, int __oflag, ...))
 {
   if (__va_arg_pack_len () != 0 && __va_arg_pack_len () != 2)
     __mq_open_wrong_number_of_args ();
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index 5937a48554..1bab76db33 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -349,7 +349,7 @@ UDItype __umulsidi3 (USItype, USItype);
     __asm__ ("mr\t%%r0,%3"                                              \
              : "=r" (r0), "=r" (r1)                                     \
              : "r"  (r1),  "r" (m1));                                   \
-    (xh) = r1; (xl) = r0;                                               \
+    (xh) = r0; (xl) = r1;                                               \
   } while (0)
 #define sdiv_qrnnd(q, r, n1, n0, d) \
   do {									\
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 4c9170c8ad..a59d9c6aee 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -821,7 +821,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
 	  size_t tmpbuflen = 1024;
 	  malloc_tmpbuf = !__libc_use_alloca (alloca_used + tmpbuflen);
 	  assert (tmpbuf == NULL);
-	  if (malloc_tmpbuf)
+	  if (!malloc_tmpbuf)
 	    tmpbuf = alloca_account (tmpbuflen, alloca_used);
 	  else
 	    {
diff --git a/sysdeps/sparc/sparc32/dl-irel.h b/sysdeps/sparc/sparc32/dl-irel.h
index 1891938d6d..2753fb4ceb 100644
--- a/sysdeps/sparc/sparc32/dl-irel.h
+++ b/sysdeps/sparc/sparc32/dl-irel.h
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <dl-plt.h>
+#include <ldsodefs.h>
 
 #define ELF_MACHINE_IRELA	1
 
@@ -36,13 +37,13 @@ elf_irela (const Elf32_Rela *reloc)
   if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1))
     {
       Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf32_Addr value = ((Elf32_Addr (*) (void)) reloc->r_addend) ();
+      Elf32_Addr value = ((Elf32_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
       *reloc_addr = value;
     }
   else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1))
     {
       Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf32_Addr value = ((Elf32_Addr (*) (void)) reloc->r_addend) ();
+      Elf32_Addr value = ((Elf32_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
 
       sparc_fixup_plt (reloc, reloc_addr, value, 0, 1);
     }
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index 9631db32e1..f8e8fe4179 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -399,7 +399,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
       && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
       && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
     {
-      value = ((Elf32_Addr (*) (void)) value) ();
+      value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
     }
 
   switch (r_type)
@@ -430,11 +430,11 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
       *reloc_addr = value;
       break;
     case R_SPARC_IRELATIVE:
-      value = ((Elf32_Addr (*) (void)) value) ();
+      value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
       *reloc_addr = value;
       break;
     case R_SPARC_JMP_IREL:
-      value = ((Elf32_Addr (*) (void)) value) ();
+      value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
       /* Fall thru */
     case R_SPARC_JMP_SLOT:
       {
@@ -562,7 +562,7 @@ elf_machine_lazy_rel (struct link_map *map,
   else if (r_type == R_SPARC_JMP_IREL)
     {
       Elf32_Addr value = map->l_addr + reloc->r_addend;
-      value = ((Elf32_Addr (*) (void)) value) ();
+      value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
       sparc_fixup_plt (reloc, reloc_addr, value, 1, 1);
     }
   else if (r_type == R_SPARC_NONE)
diff --git a/sysdeps/sparc/sparc64/dl-irel.h b/sysdeps/sparc/sparc64/dl-irel.h
index 1a2a0a3dd5..0d70e2a448 100644
--- a/sysdeps/sparc/sparc64/dl-irel.h
+++ b/sysdeps/sparc/sparc64/dl-irel.h
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <dl-plt.h>
+#include <ldsodefs.h>
 
 #define ELF_MACHINE_IRELA	1
 
@@ -36,13 +37,13 @@ elf_irela (const Elf64_Rela *reloc)
   if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1))
     {
       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) ();
+      Elf64_Addr value = ((Elf64_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
       *reloc_addr = value;
     }
   else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1))
     {
       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) ();
+      Elf64_Addr value = ((Elf64_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
       struct link_map map = { .l_addr = 0 };
 
       /* 'high' is always zero, for large PLT entries the linker
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index 82ab5a4547..aaa22d6540 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -430,7 +430,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
   if (sym != NULL
       && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
       && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
-    value = ((Elf64_Addr (*) (void)) value) ();
+    value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
 
   switch (r_type)
     {
@@ -460,11 +460,11 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
       *reloc_addr = value;
       break;
     case R_SPARC_IRELATIVE:
-      value = ((Elf64_Addr (*) (void)) value) ();
+      value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
       *reloc_addr = value;
       break;
     case R_SPARC_JMP_IREL:
-      value = ((Elf64_Addr (*) (void)) value) ();
+      value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
       /* Fall thru */
     case R_SPARC_JMP_SLOT:
 #ifdef RESOLVE_CONFLICT_FIND_MAP
@@ -658,7 +658,7 @@ elf_machine_lazy_rel (struct link_map *map,
 	   || r_type == R_SPARC_IRELATIVE)
     {
       Elf64_Addr value = map->l_addr + reloc->r_addend;
-      value = ((Elf64_Addr (*) (void)) value) ();
+      value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
       if (r_type == R_SPARC_JMP_IREL)
 	{
 	  /* 'high' is always zero, for large PLT entries the linker
diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy.S b/sysdeps/sparc/sparc64/multiarch/memcpy.S
index a708de10e2..c12dc3bbed 100644
--- a/sysdeps/sparc/sparc64/multiarch/memcpy.S
+++ b/sysdeps/sparc/sparc64/multiarch/memcpy.S
@@ -32,26 +32,10 @@ ENTRY(memcpy)
 	 or	%o3, %lo(_GLOBAL_OFFSET_TABLE_+4), %o3
 1:	add	%o7, %o3, %o3
 	mov	%o5, %o7
-	sethi	%hi(_rtld_global_ro), %o2
-	or	%o2, %lo(_rtld_global_ro), %o2
-#  ifdef __arch64__
-	ldx	[%o3 + %o2], %o2
-	ldx	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET], %o2
-#  else
-	ld	[%o3 + %o2], %o2
-	ld	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET + 4], %o2
-#  endif
-# else
-	set	_dl_hwcap, %o3
-#  ifdef __arch64__
-	ldx	[%o3], %o2
-#  else
-	ld	[%o3 + 4], %o2
-#  endif
 # endif
-	andcc	%o2, 0x80, %g0	! HWCAP_SPARC_N2
+	andcc	%o0, 0x80, %g0	! HWCAP_SPARC_N2
 	be	1f
-	 andcc	%o2, 0x40, %g0	! HWCAP_SPARC_BLKINIT
+	 andcc	%o0, 0x40, %g0	! HWCAP_SPARC_BLKINIT
 # ifdef SHARED
 	sethi	%gdop_hix22(__memcpy_niagara2), %o1
 	xor	%o1, %gdop_lox10(__memcpy_niagara2), %o1
@@ -61,7 +45,7 @@ ENTRY(memcpy)
 	ba	10f
 	 nop
 1:	be	1f
-	 andcc	%o2, 0x20, %g0	! HWCAP_SPARC_ULTRA3
+	 andcc	%o0, 0x20, %g0	! HWCAP_SPARC_ULTRA3
 # ifdef SHARED
 	sethi	%gdop_hix22(__memcpy_niagara1), %o1
 	xor	%o1, %gdop_lox10(__memcpy_niagara1), %o1
diff --git a/sysdeps/sparc/sparc64/multiarch/memset.S b/sysdeps/sparc/sparc64/multiarch/memset.S
index befd7edc82..2e27448742 100644
--- a/sysdeps/sparc/sparc64/multiarch/memset.S
+++ b/sysdeps/sparc/sparc64/multiarch/memset.S
@@ -32,24 +32,8 @@ ENTRY(memset)
 	 or	%o3, %lo(_GLOBAL_OFFSET_TABLE_+4), %o3
 1:	add	%o7, %o3, %o3
 	mov	%o5, %o7
-	sethi	%hi(_rtld_global_ro), %o2
-	or	%o2, %lo(_rtld_global_ro), %o2
-#  ifdef __arch64__
-	ldx	[%o3 + %o2], %o2
-	ldx	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET], %o2
-#  else
-	ld	[%o3 + %o2], %o2
-	ld	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET + 4], %o2
-#  endif
-# else
-	set	_dl_hwcap, %o3
-#  ifdef __arch64__
-	ldx	[%o3], %o2
-#  else
-	ld	[%o3 + 4], %o2
-#  endif
 # endif
-	andcc	%o2, 0x40, %g0	! HWCAP_SPARC_BLKINIT
+	andcc	%o0, 0x40, %g0	! HWCAP_SPARC_BLKINIT
 	be	9f
 	 nop
 # ifdef SHARED
@@ -84,24 +68,8 @@ ENTRY(__bzero)
 	 or	%o3, %lo(_GLOBAL_OFFSET_TABLE_+4), %o3
 1:	add	%o7, %o3, %o3
 	mov	%o5, %o7
-	sethi	%hi(_rtld_global_ro), %o2
-	or	%o2, %lo(_rtld_global_ro), %o2
-#  ifdef __arch64__
-	ldx	[%o3 + %o2], %o2
-	ldx	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET], %o2
-#  else
-	ld	[%o3 + %o2], %o2
-	ld	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET + 4], %o2
-#  endif
-# else
-	set	_dl_hwcap, %o3
-#  ifdef __arch64__
-	ldx	[%o3], %o2
-#  else
-	ld	[%o3 + 4], %o2
-#  endif
 # endif
-	andcc	%o2, 0x40, %g0	! HWCAP_SPARC_BLKINIT
+	andcc	%o0, 0x40, %g0	! HWCAP_SPARC_BLKINIT
 	be	9f
 	 nop
 # ifdef SHARED
diff --git a/sysdeps/unix/sysv/linux/check_native.c b/sysdeps/unix/sysv/linux/check_native.c
index 6e6624abe1..dedce34803 100644
--- a/sysdeps/unix/sysv/linux/check_native.c
+++ b/sysdeps/unix/sysv/linux/check_native.c
@@ -1,5 +1,5 @@
 /* Determine whether interfaces use native transport.  Linux version.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007,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
@@ -23,6 +23,7 @@
 #include <stddef.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 #include <time.h>
 #include <unistd.h>
 #include <net/if.h>
diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
index eb7fedc077..28fce4f8e7 100644
--- a/sysdeps/unix/sysv/linux/dl-osinfo.h
+++ b/sysdeps/unix/sysv/linux/dl-osinfo.h
@@ -81,7 +81,7 @@ _dl_setup_stack_chk_guard (void *dl_random)
 	{
 	  ssize_t reslen = read_not_cancel (fd, ret.bytes + 1, filllen);
 	  close_not_cancel_no_status (fd);
-	  if (reslen == (ssize_) filllen)
+	  if (reslen == (ssize_t) filllen)
 	    return ret.num;
 	}
 # endif
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/dl-fxstatat64.c b/sysdeps/unix/sysv/linux/wordsize-64/dl-fxstatat64.c
new file mode 100644
index 0000000000..339e5f4335
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/dl-fxstatat64.c
@@ -0,0 +1,6 @@
+/* In this implementation we do not really care whether the call fails
+   because of missing kernel support since we do not even call the
+   function in this case.  */
+#undef __ASSUME_ATFCTS
+#define __ASSUME_ATFCTS 1
+#include "fxstatat.c"
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c
index 34ec2df2d5..809d105c77 100644
--- a/sysdeps/x86_64/multiarch/init-arch.c
+++ b/sysdeps/x86_64/multiarch/init-arch.c
@@ -74,6 +74,7 @@ __init_cpu_features (void)
 	}
       else if (family == 0x06)
 	{
+	  ecx = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx;
 	  model += extended_model;
 	  switch (model)
 	    {
@@ -83,6 +84,12 @@ __init_cpu_features (void)
 	      __cpu_features.feature[index_Slow_BSF] |= bit_Slow_BSF;
 	      break;
 
+	    default:
+	      /* Unknown family 0x06 processors.  Assuming this is one
+	         of Core i3/i5/i7 processors if AVX is available.  */
+	      if ((ecx & bit_AVX) == 0)
+		break;
+
 	    case 0x1a:
 	    case 0x1e:
 	    case 0x1f: