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. --- elf/dl-runtime.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'elf/dl-runtime.c') diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c index b27cfbf..8778e67 100644 --- a/elf/dl-runtime.c +++ b/elf/dl-runtime.c @@ -27,6 +27,7 @@ #include #include "dynamic-link.h" #include +#include #if (!defined ELF_MACHINE_NO_RELA && !defined ELF_MACHINE_PLT_REL) \ @@ -146,7 +147,7 @@ _dl_fixup ( if (sym != NULL && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)) - value = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) (); + value = elf_ifunc_invoke (DL_FIXUP_VALUE_ADDR (value)); /* Finally, fix up the plt itself. */ if (__builtin_expect (GLRO(dl_bind_not), 0)) @@ -235,8 +236,7 @@ _dl_profile_fixup ( if (defsym != NULL && __builtin_expect (ELFW(ST_TYPE) (defsym->st_info) == STT_GNU_IFUNC, 0)) - value = ((DL_FIXUP_VALUE_TYPE (*) (void)) - DL_FIXUP_VALUE_ADDR (value)) (); + value = elf_ifunc_invoke (DL_FIXUP_VALUE_ADDR (value)); } else { @@ -246,8 +246,7 @@ _dl_profile_fixup ( if (__builtin_expect (ELFW(ST_TYPE) (refsym->st_info) == STT_GNU_IFUNC, 0)) - value = ((DL_FIXUP_VALUE_TYPE (*) (void)) - DL_FIXUP_VALUE_ADDR (value)) (); + value = elf_ifunc_invoke (DL_FIXUP_VALUE_ADDR (value)); result = l; } -- cgit v1.1