arm: Pass hwcap to ifuncs.
authorRichard Henderson <rth@redhat.com>
Fri, 25 May 2012 16:07:05 +0000 (12:07 -0400)
committerRichard Henderson <rth@redhat.com>
Fri, 25 May 2012 16:07:05 +0000 (12:07 -0400)
        * sysdeps/arm/dl-irel.h (elf_ifunc_invoke): Pass dl_hwcap.
* sysdeps/arm/dl-machine.h (elf_machine_rel): Use elf_ifunc_invoke.
        (elf_machine_rela): Likewise.

ChangeLog.arm
sysdeps/arm/dl-irel.h
sysdeps/arm/dl-machine.h

index f6eac63fed024df18f2a762cd83e8bb404ecba08..778b4d7822921b7c22d2f3df1694a7892f8fb498 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-25  Richard Henderson  <rth@twiddle.net>
+
+       * sysdeps/arm/dl-irel.h (elf_ifunc_invoke): Pass dl_hwcap.
+       * sysdeps/arm/dl-machine.h (elf_machine_rel): Use elf_ifunc_invoke.
+       (elf_machine_rela): Likewise.
+
 2012-05-23  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/unix/sysv/linux/arm/bits/mman.h (MADV_DONTDUMP): Define.
index 5141031cef5ef4fea2d4d617bdcd9d197bc04df1..5b1964e90ec812343d6e432bf9bd03a627bdfa67 100644 (file)
@@ -29,7 +29,7 @@ static inline Elf32_Addr
 __attribute ((always_inline))
 elf_ifunc_invoke (Elf32_Addr addr)
 {
-  return ((Elf32_Addr (*) (void)) (addr)) ();
+  return ((Elf32_Addr (*) (unsigned long int)) (addr)) (GLRO(dl_hwcap));
 }
 
 static inline void
index 58cf418c09b1cf7faa1aaceb5859f11460b65068..8d905e8ad9e54424b3142feb0c8ec63994039417 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/param.h>
 #include <tls.h>
 #include <dl-tlsdesc.h>
+#include <dl-irel.h>
 
 #define CLEAR_CACHE(BEG,END)                                           \
   INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)
@@ -377,7 +378,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
          && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
          && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
          && __builtin_expect (!skip_ifunc, 1))
-       value = ((Elf32_Addr (*) (void)) value) ();
+       value = elf_ifunc_invoke (value);
 
       switch (r_type)
        {
@@ -551,7 +552,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)
          && __builtin_expect (!skip_ifunc, 1))
-       value = ((Elf32_Addr (*) (void)) value) ();
+       value = elf_ifunc_invoke (value);
 
       switch (r_type)
        {