diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-06-03 08:26:04 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-06-03 08:26:04 +0200 |
commit | 6dfc0207ebeb639e47ba7387a9123ed622904cf7 (patch) | |
tree | 2206f40e0eaf0c3386bc31334668857f6c39967d /dlfcn/dlinfo.c | |
parent | 492560a32e14c9a985274e1995b67a577197261e (diff) | |
download | glibc-6dfc0207ebeb639e47ba7387a9123ed622904cf7.zip glibc-6dfc0207ebeb639e47ba7387a9123ed622904cf7.tar.gz glibc-6dfc0207ebeb639e47ba7387a9123ed622904cf7.tar.bz2 |
dlfcn: Move dlinfo into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'dlfcn/dlinfo.c')
-rw-r--r-- | dlfcn/dlinfo.c | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/dlfcn/dlinfo.c b/dlfcn/dlinfo.c index 9fb2a14..15fcbc5 100644 --- a/dlfcn/dlinfo.c +++ b/dlfcn/dlinfo.c @@ -20,18 +20,8 @@ #include <link.h> #include <ldsodefs.h> #include <libintl.h> - -#if !defined SHARED && IS_IN (libdl) - -int -dlinfo (void *handle, int request, void *arg) -{ - return __dlinfo (handle, request, arg); -} - -#else - -# include <dl-tls.h> +#include <dl-tls.h> +#include <shlib-compat.h> struct dlinfo_args { @@ -88,18 +78,33 @@ dlinfo_doit (void *argsblock) } } +static int +dlinfo_implementation (void *handle, int request, void *arg) +{ + struct dlinfo_args args = { handle, request, arg }; + return _dlerror_run (&dlinfo_doit, &args) ? -1 : 0; +} + +#ifdef SHARED int -__dlinfo (void *handle, int request, void *arg) +___dlinfo (void *handle, int request, void *arg) { -# ifdef SHARED if (!rtld_active ()) return _dlfcn_hook->dlinfo (handle, request, arg); -# endif - - struct dlinfo_args args = { handle, request, arg }; - return _dlerror_run (&dlinfo_doit, &args) ? -1 : 0; + else + return dlinfo_implementation (handle, request, arg); } -# ifdef SHARED -strong_alias (__dlinfo, dlinfo) +versioned_symbol (libc, ___dlinfo, dlinfo, GLIBC_2_34); + +# if OTHER_SHLIB_COMPAT (libdl, GLIBC_2_3_3, GLIBC_2_34) +compat_symbol (libc, ___dlinfo, dlinfo, GLIBC_2_3_3); # endif +#else /* !SHARED */ +/* Also used with _dlfcn_hook. */ +int +__dlinfo (void *handle, int request, void *arg) +{ + return dlinfo_implementation (handle, request, arg); +} +weak_alias (__dlinfo, dlinfo) #endif |