arm: Pass hwcap to ifuncs.

* 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.
This commit is contained in:
Richard Henderson 2012-05-25 12:07:05 -04:00
parent 5b0ef573d2
commit 73da6bacfd
3 changed files with 10 additions and 3 deletions

View 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.

View 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

View 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)
{