- Fix indirect function support to avoid calling optimized routines
  for the wrong hardware (#985342).
This commit is contained in:
Carlos O'Donell 2013-09-23 01:04:48 -04:00
parent dc7ed68f35
commit 7c6535ed6a
2 changed files with 48 additions and 1 deletions

40
glibc-rh985342.patch Normal file
View File

@ -0,0 +1,40 @@
#
# Both of these change are required and alraedy upstream.
#
# 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.
#
# 2013-07-02 Will Newton <will.newton@linaro.org>
#
# * sysdeps/arm/dl-machine.h (elf_machine_rela): Pass dl_hwcap
# to IFUNC resolver functions.
#
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/ports/sysdeps/arm/dl-machine.h b/ports/sysdeps/arm/dl-machine.h
index 4cf87a9..d251527 100644
--- a/ports/sysdeps/arm/dl-machine.h
+++ b/ports/sysdeps/arm/dl-machine.h
@@ -595,7 +595,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *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,5 +1,6 @@
%define glibcsrcdir glibc-2.17-c758a686 %define glibcsrcdir glibc-2.17-c758a686
%define glibcversion 2.17 %define glibcversion 2.17
%define glibcrelease 17%{?dist}
### glibc.spec.in follows: ### glibc.spec.in follows:
%define run_glibc_tests 1 %define run_glibc_tests 1
%define auxarches athlon alphaev6 %define auxarches athlon alphaev6
@ -27,7 +28,7 @@
Summary: The GNU libc libraries Summary: The GNU libc libraries
Name: glibc Name: glibc
Version: %{glibcversion} Version: %{glibcversion}
Release: 16%{?dist} Release: %{glibcrelease}
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
# Things that are linked directly into dynamically linked programs # Things that are linked directly into dynamically linked programs
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@ -130,6 +131,7 @@ Patch1008: %{name}-rh984829.patch
Patch1009: %{name}-rh995841.patch Patch1009: %{name}-rh995841.patch
Patch1010: %{name}-rh947892.patch Patch1010: %{name}-rh947892.patch
Patch1011: %{name}-rh1008299.patch Patch1011: %{name}-rh1008299.patch
Patch1012: %{name}-rh985342.patch
# #
# Patches submitted, but not yet approved upstream. # Patches submitted, but not yet approved upstream.
@ -454,6 +456,7 @@ package or when debugging this package.
%patch0041 -p1 %patch0041 -p1
%patch0042 -p1 %patch0042 -p1
%patch1011 -p1 %patch1011 -p1
%patch1012 -p1
# On powerpc32, hp timing is only available in power4/power6 # On powerpc32, hp timing is only available in power4/power6
# libs, not in base, so pre-power4 dynamic linker is incompatible # libs, not in base, so pre-power4 dynamic linker is incompatible
@ -1244,6 +1247,10 @@ rm -f *.filelist*
%endif %endif
%changelog %changelog
* Sun Sep 22 2013 Carlos O'Donell <carlos@redhat.com> - 2.17-17
- Fix indirect function support to avoid calling optimized routines
for the wrong hardware (#985342).
* Wed Sep 18 2013 Patsy Franklin <pfrankli@redhat.com> - 2.17-16 * Wed Sep 18 2013 Patsy Franklin <pfrankli@redhat.com> - 2.17-16
- Fix conditional requiring specific binutils for s390/s390x. - Fix conditional requiring specific binutils for s390/s390x.