diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-06-03 08:26:04 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-06-03 09:12:05 +0200 |
commit | 466c1ea15f461edb8e3ffaf5d86d708876343bbf (patch) | |
tree | 43d42d322ff24bd12c4124a9edafc4e0e4232f0a /dlfcn/dlvsym.c | |
parent | 9c76debc983e1a16e2e723b36526826713a671af (diff) | |
download | glibc-466c1ea15f461edb8e3ffaf5d86d708876343bbf.tar glibc-466c1ea15f461edb8e3ffaf5d86d708876343bbf.tar.gz glibc-466c1ea15f461edb8e3ffaf5d86d708876343bbf.tar.bz2 glibc-466c1ea15f461edb8e3ffaf5d86d708876343bbf.zip |
dlfcn: Rework static dlopen hooks
Consolidate all hooks structures into a single one. There are
no static dlopen ABI concerns because glibc 2.34 already comes
with substantial ABI-incompatible changes in this area. (Static
dlopen requires the exact same dynamic glibc version that was used
for static linking.)
The new approach uses a pointer to the hooks structure into
_rtld_global_ro and initalizes it in __rtld_static_init. This avoids
a back-and-forth with various callback functions.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'dlfcn/dlvsym.c')
-rw-r--r-- | dlfcn/dlvsym.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dlfcn/dlvsym.c b/dlfcn/dlvsym.c index de6b340647..9b76f9afa5 100644 --- a/dlfcn/dlvsym.c +++ b/dlfcn/dlvsym.c @@ -66,7 +66,8 @@ void * ___dlvsym (void *handle, const char *name, const char *version) { if (!rtld_active ()) - return _dlfcn_hook->dlvsym (handle, name, version, RETURN_ADDRESS (0)); + return GLRO (dl_dlfcn_hook)->dlvsym (handle, name, version, + RETURN_ADDRESS (0)); else return dlvsym_implementation (handle, name, version, RETURN_ADDRESS (0)); } |