Fix indirect function support to avoid calling optimized routines

for the wrong hardware (#985342).
This commit is contained in:
Carlos O'Donell 2013-08-28 00:34:43 -04:00
parent 97490e6a11
commit b8280fad3d
2 changed files with 33 additions and 1 deletions

23
glibc-rh985342.patch Normal file
View File

@ -0,0 +1,23 @@
#
# Posted upstream:
# http://sourceware.org/ml/libc-ports/2013-08/msg00053.html
#
# 2013-08-28 Kyle McMartin <kyle@redhat.com>
# Carlos O'Donell <carlos@redhat.com>
#
# * 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

View File

@ -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 <carlos@redhat.com> - 2.18-5
- Fix indirect function support to avoid calling optimized routines
for the wrong hardware (#985342).
* Mon Aug 26 2013 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.18-4
- Initialize res_hconf in nscd. (#1000924).