diff options
author | David S. Miller <davem@davemloft.net> | 2011-06-20 19:56:40 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-20 19:56:40 -0700 |
commit | 42675c6ff0e95346de8a2cbc066e14e0d6a856e4 (patch) | |
tree | 2350fafe239e6a63d30f480628cc1f1d86e0b5a4 /elf | |
parent | 57912a71cc379f8582e3ea272782dc39c6c02e45 (diff) | |
download | glibc-42675c6ff0e95346de8a2cbc066e14e0d6a856e4.tar glibc-42675c6ff0e95346de8a2cbc066e14e0d6a856e4.tar.gz glibc-42675c6ff0e95346de8a2cbc066e14e0d6a856e4.tar.bz2 glibc-42675c6ff0e95346de8a2cbc066e14e0d6a856e4.zip |
Add an elf_ifunc_invoke interface so that architectures can implement
the ifunc resolver calls however they wish.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-runtime.c | 9 | ||||
-rw-r--r-- | elf/dl-sym.c | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c index b27cfbf204..8778e67f7c 100644 --- a/elf/dl-runtime.c +++ b/elf/dl-runtime.c @@ -27,6 +27,7 @@ #include <sysdep-cancel.h> #include "dynamic-link.h" #include <tls.h> +#include <dl-irel.h> #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; } diff --git a/elf/dl-sym.c b/elf/dl-sym.c index 4faf05c00b..0af3e48d65 100644 --- a/elf/dl-sym.c +++ b/elf/dl-sym.c @@ -27,6 +27,7 @@ #include <dl-hash.h> #include <sysdep-cancel.h> #include <dl-tls.h> +#include <dl-irel.h> #ifdef SHARED @@ -196,8 +197,7 @@ RTLD_NEXT used in code not dynamically loaded")); { DL_FIXUP_VALUE_TYPE fixup = DL_FIXUP_MAKE_VALUE (result, (ElfW(Addr)) value); - fixup = - ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (fixup)) (); + fixup = elf_ifunc_invoke (DL_FIXUP_VALUE_ADDR (fixup)); value = (void *) DL_FIXUP_VALUE_CODE_ADDR (fixup); } |