From 466c1ea15f461edb8e3ffaf5d86d708876343bbf Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 3 Jun 2021 08:26:04 +0200 Subject: 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 --- dlfcn/dlopenold.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dlfcn/dlopenold.c') diff --git a/dlfcn/dlopenold.c b/dlfcn/dlopenold.c index 0fe5f24..9115501 100644 --- a/dlfcn/dlopenold.c +++ b/dlfcn/dlopenold.c @@ -71,7 +71,7 @@ __dlopen_nocheck (const char *file, int mode) args.mode = mode; if (!rtld_active ()) - return _dlfcn_hook->dlopen (file, mode, RETURN_ADDRESS (0)); + return GLRO (dl_dlfcn_hook)->dlopen (file, mode, RETURN_ADDRESS (0)); return _dlerror_run (dlopen_doit, &args) ? NULL : args.new; } -- cgit v1.1