mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Add an elf_ifunc_invoke interface so that architectures can implement
the ifunc resolver calls however they wish.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user