diff options
Diffstat (limited to 'sysdeps/x86_64/dl-irel.h')
-rw-r--r-- | sysdeps/x86_64/dl-irel.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/x86_64/dl-irel.h b/sysdeps/x86_64/dl-irel.h index d2d5c0670e..19f94576b3 100644 --- a/sysdeps/x86_64/dl-irel.h +++ b/sysdeps/x86_64/dl-irel.h @@ -26,6 +26,13 @@ #define ELF_MACHINE_IRELA 1 +static inline Elf64_Addr +__attribute ((always_inline)) +elf_ifunc_invoke (Elf64_Addr addr) +{ + return ((Elf64_Addr (*) (void)) (addr)) (); +} + static inline void __attribute ((always_inline)) elf_irela (const Elf64_Rela *reloc) @@ -35,7 +42,7 @@ elf_irela (const Elf64_Rela *reloc) if (__builtin_expect (r_type == R_X86_64_IRELATIVE, 1)) { - Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) (); + Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend); *reloc_addr = value; } else |