about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-01-04 18:46:17 +0100
committerFlorian Weimer <fweimer@redhat.com>2018-01-04 18:46:24 +0100
commit82eef55f8fad3e00c53050de5d6ebea08df488b3 (patch)
treee0e1ed86b2296703182789d7f5ea607bf066ffe4 /include
parent7abf02f3ee7627d617def77d0d6e7bea2da8d98c (diff)
downloadglibc-82eef55f8fad3e00c53050de5d6ebea08df488b3.tar.gz
glibc-82eef55f8fad3e00c53050de5d6ebea08df488b3.tar.xz
glibc-82eef55f8fad3e00c53050de5d6ebea08df488b3.zip
elf: Support dlvsym within libc.so
This commit adds a new _dl_open_hook entry for dlvsym and implements the
function using the existing dl_lookup_symbol_x function supplied by the
dynamic loader.

A new hook variable, _dl_open_hook2, is introduced, which should make
this change suitable for backporting: For old statically linked
binaries, __libc_dlvsym will always return NULL.
Diffstat (limited to 'include')
-rw-r--r--include/dlfcn.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/dlfcn.h b/include/dlfcn.h
index 526086f1a0..12ef913e19 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -35,9 +35,11 @@ extern char **__libc_argv attribute_hidden;
   __libc_dlopen_mode (name, RTLD_LAZY | __RTLD_DLOPEN)
 extern void *__libc_dlopen_mode  (const char *__name, int __mode);
 extern void *__libc_dlsym   (void *__map, const char *__name);
+extern void *__libc_dlvsym (void *map, const char *name, const char *version);
 extern int   __libc_dlclose (void *__map);
 libc_hidden_proto (__libc_dlopen_mode)
 libc_hidden_proto (__libc_dlsym)
+libc_hidden_proto (__libc_dlvsym)
 libc_hidden_proto (__libc_dlclose)
 
 /* Locate shared object containing the given address.  */