From bc5e8462188bdd9919e804fbba44e4b983b7724a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 21 Oct 2009 06:23:42 -0700 Subject: Handle IFUNC symbols in dlsym. --- elf/dl-sym.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'elf/dl-sym.c') diff --git a/elf/dl-sym.c b/elf/dl-sym.c index 740bb9a..459729f 100644 --- a/elf/dl-sym.c +++ b/elf/dl-sym.c @@ -191,6 +191,11 @@ RTLD_NEXT used in code not dynamically loaded")); #endif value = DL_SYMBOL_ADDRESS (result, ref); + /* Resolve indirect function address. */ + if (__builtin_expect (ELFW(ST_TYPE) (ref->st_info) == STT_GNU_IFUNC, 0)) + value + = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) (); + #ifdef SHARED /* Auditing checkpoint: we have a new binding. Provide the auditing libraries the possibility to change the value and -- cgit v1.1