about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-06-20 19:56:40 -0700
committerDavid S. Miller <davem@davemloft.net>2011-06-20 19:56:40 -0700
commit42675c6ff0e95346de8a2cbc066e14e0d6a856e4 (patch)
tree2350fafe239e6a63d30f480628cc1f1d86e0b5a4 /sysdeps/i386
parent57912a71cc379f8582e3ea272782dc39c6c02e45 (diff)
downloadglibc-42675c6ff0e95346de8a2cbc066e14e0d6a856e4.tar.gz
glibc-42675c6ff0e95346de8a2cbc066e14e0d6a856e4.tar.xz
glibc-42675c6ff0e95346de8a2cbc066e14e0d6a856e4.zip
Add an elf_ifunc_invoke interface so that architectures can implement
the ifunc resolver calls however they wish.
Diffstat (limited to 'sysdeps/i386')
-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