about summary refs log tree commit diff
path: root/dlfcn/dladdr1.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-06-03 08:26:04 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-06-03 08:26:04 +0200
commit492560a32e14c9a985274e1995b67a577197261e (patch)
treea356eea3cb1f886fdb4b39a6a64e62582ca74679 /dlfcn/dladdr1.c
parent6a1ed32789eaec6e1cd4345552e7342b5b18da5f (diff)
downloadglibc-492560a32e14c9a985274e1995b67a577197261e.tar.gz
glibc-492560a32e14c9a985274e1995b67a577197261e.tar.xz
glibc-492560a32e14c9a985274e1995b67a577197261e.zip
dlfcn: Move dladdr1 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/dladdr1.c')
-rw-r--r--dlfcn/dladdr1.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/dlfcn/dladdr1.c b/dlfcn/dladdr1.c
index 98cd60d78e..203d6398e4 100644
--- a/dlfcn/dladdr1.c
+++ b/dlfcn/dladdr1.c
@@ -18,24 +18,15 @@
 
 #include <dlfcn.h>
 #include <ldsodefs.h>
-
-#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 <shlib-compat.h>
 
 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