From 42675c6ff0e95346de8a2cbc066e14e0d6a856e4 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 20 Jun 2011 19:56:40 -0700 Subject: Add an elf_ifunc_invoke interface so that architectures can implement the ifunc resolver calls however they wish. --- sysdeps/i386/dl-irel.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sysdeps/i386') diff --git a/sysdeps/i386/dl-irel.h b/sysdeps/i386/dl-irel.h index 30385a1..70cd6b0 100644 --- a/sysdeps/i386/dl-irel.h +++ b/sysdeps/i386/dl-irel.h @@ -26,6 +26,13 @@ #define ELF_MACHINE_IREL 1 +static inline Elf32_Addr +__attribute ((always_inline)) +elf_ifunc_invoke (Elf32_Addr addr) +{ + return ((Elf32_Addr (*) (void)) (addr)) (); +} + static inline void __attribute ((always_inline)) elf_irel (const Elf32_Rel *reloc) @@ -35,7 +42,7 @@ elf_irel (const Elf32_Rel *reloc) if (__builtin_expect (r_type == R_386_IRELATIVE, 1)) { - Elf32_Addr value = ((Elf32_Addr (*) (void)) (*reloc_addr)) (); + Elf32_Addr value = elf_ifunc_invoke(*reloc_addr); *reloc_addr = value; } else -- cgit v1.1