From b8280fad3dff1766f9b87d38acefdfdb7ba61c09 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 28 Aug 2013 00:34:43 -0400 Subject: [PATCH] Fix indirect function support to avoid calling optimized routines for the wrong hardware (#985342). --- glibc-rh985342.patch | 23 +++++++++++++++++++++++ glibc.spec | 11 ++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 glibc-rh985342.patch diff --git a/glibc-rh985342.patch b/glibc-rh985342.patch new file mode 100644 index 0000000..ce2463b --- /dev/null +++ b/glibc-rh985342.patch @@ -0,0 +1,23 @@ +# +# Posted upstream: +# http://sourceware.org/ml/libc-ports/2013-08/msg00053.html +# +# 2013-08-28 Kyle McMartin +# Carlos O'Donell +# +# * sysdeps/arm/dl-machine [!RTLD_BOOTSTRAP] (elf_machine_rel): +# Pass GLRO(dl_hwcap) to the IFUNC resolver. +# +diff --git a/ports/sysdeps/arm/dl-machine.h b/ports/sysdeps/arm/dl-machine.h +index d251527..85dba67 100644 +--- a/ports/sysdeps/arm/dl-machine.h ++++ b/ports/sysdeps/arm/dl-machine.h +@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, + break; + case R_ARM_IRELATIVE: + value = map->l_addr + *reloc_addr; +- value = ((Elf32_Addr (*) (void)) value) (); ++ value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap)); + *reloc_addr = value; + break; + #endif diff --git a/glibc.spec b/glibc.spec index 2b234f7..68ee4e6 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,6 +1,6 @@ %define glibcsrcdir glibc-2.18 %define glibcversion 2.18 -%define glibcrelease 4%{?dist} +%define glibcrelease 5%{?dist} # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -217,6 +217,10 @@ Patch2028: %{name}-strcoll-cve.patch # Initialize res_hconf in nscd Patch2029: %{name}-rh1000924.patch + +# Pass dl_hwcap to IFUNC resolver on 32-bit ARM. +Patch2030: %{name}-rh985342.patch + ############################################################################## # End of glibc patches. ############################################################################## @@ -538,6 +542,7 @@ package or when debugging this package. %patch0041 -p1 %patch0042 -p1 %patch2029 -p1 +%patch2030 -p1 ############################################################################## # %%prep - Additional prep required... @@ -1623,6 +1628,10 @@ rm -f *.filelist* %endif %changelog +* Wed Aug 28 2013 Carlos O'Donell - 2.18-5 +- Fix indirect function support to avoid calling optimized routines + for the wrong hardware (#985342). + * Mon Aug 26 2013 Siddhesh Poyarekar - 2.18-4 - Initialize res_hconf in nscd. (#1000924).