glibc/glibc-rh985342.patch
Carlos O'Donell 7c6535ed6a Resolves: #985342
- Fix indirect function support to avoid calling optimized routines
  for the wrong hardware (#985342).
2013-09-23 01:04:48 -04:00

41 lines
1.4 KiB
Diff

#
# 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