From 492560a32e14c9a985274e1995b67a577197261e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 3 Jun 2021 08:26:04 +0200 Subject: dlfcn: Move dladdr1 into libc The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella --- dlfcn/dladdr1.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'dlfcn/dladdr1.c') diff --git a/dlfcn/dladdr1.c b/dlfcn/dladdr1.c index 98cd60d..203d639 100644 --- a/dlfcn/dladdr1.c +++ b/dlfcn/dladdr1.c @@ -18,24 +18,15 @@ #include #include - -#if !defined SHARED && IS_IN (libdl) - -int -dladdr1 (const void *address, Dl_info *info, void **extra, int flags) -{ - return __dladdr1 (address, info, extra, flags); -} - -#else +#include int __dladdr1 (const void *address, Dl_info *info, void **extra, int flags) { -# ifdef SHARED +#ifdef SHARED if (!rtld_active ()) return _dlfcn_hook->dladdr1 (address, info, extra, flags); -# endif +#endif switch (flags) { @@ -48,7 +39,8 @@ __dladdr1 (const void *address, Dl_info *info, void **extra, int flags) return _dl_addr (address, info, (struct link_map **) extra, NULL); } } -# ifdef SHARED -strong_alias (__dladdr1, dladdr1) -# endif +versioned_symbol (libc, __dladdr1, dladdr1, GLIBC_2_34); + +#if OTHER_SHLIB_COMPAT (libdl, GLIBC_2_3_3, GLIBC_2_34) +compat_symbol (libdl, __dladdr1, dladdr1, GLIBC_2_3_3); #endif -- cgit v1.1