about summary refs log tree commit diff
path: root/sysdeps/i386/dl-irel.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/dl-irel.h')
-rw-r--r--sysdeps/i386/dl-irel.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/i386/dl-irel.h b/sysdeps/i386/dl-irel.h
index 30385a1ef8..70cd6b04db 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