aboutsummaryrefslogtreecommitdiff
path: root/dlfcn
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
commit602252b553031d49c70467bfebcb1ba3bd264501 (patch)
tree1a1b1071ffcb164387c706c2b39544d4439b0956 /dlfcn
parentd8cce17d2a8f572f26ed483246a505f45579ea0e (diff)
downloadglibc-602252b553031d49c70467bfebcb1ba3bd264501.zip
glibc-602252b553031d49c70467bfebcb1ba3bd264501.tar.gz
glibc-602252b553031d49c70467bfebcb1ba3bd264501.tar.bz2
dlfcn: Move dladdr 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')
-rw-r--r--dlfcn/Makefile3
-rw-r--r--dlfcn/Versions3
-rw-r--r--dlfcn/dladdr.c22
-rw-r--r--dlfcn/sdladdr.c1
4 files changed, 11 insertions, 18 deletions
diff --git a/dlfcn/Makefile b/dlfcn/Makefile
index 4bdf524..f079346 100644
--- a/dlfcn/Makefile
+++ b/dlfcn/Makefile
@@ -21,11 +21,12 @@ include ../Makeconfig
headers := bits/dlfcn.h dlfcn.h
extra-libs := libdl
-libdl-routines := dlopen dlsym dlvsym dladdr dladdr1 dlinfo \
+libdl-routines := dlopen dlsym dlvsym dladdr1 dlinfo \
dlmopen dlfcn
routines := $(patsubst %,s%,$(filter-out dlfcn,$(libdl-routines)))
elide-routines.os := $(routines)
routines += \
+ dladdr \
dlclose \
dlerror \
libc_dlerror_result \
diff --git a/dlfcn/Versions b/dlfcn/Versions
index d00993a..f801fff 100644
--- a/dlfcn/Versions
+++ b/dlfcn/Versions
@@ -1,9 +1,11 @@
libc {
GLIBC_2.0 {
+ dladdr;
dlclose;
dlerror;
}
GLIBC_2.34 {
+ dladdr;
dlclose;
dlerror;
}
@@ -15,7 +17,6 @@ libc {
}
libdl {
GLIBC_2.0 {
- dladdr;
dlopen;
dlsym;
}
diff --git a/dlfcn/dladdr.c b/dlfcn/dladdr.c
index 27a6e49..3ef1b7f 100644
--- a/dlfcn/dladdr.c
+++ b/dlfcn/dladdr.c
@@ -18,27 +18,19 @@
#include <dlfcn.h>
#include <ldsodefs.h>
-
-#if !defined SHARED && IS_IN (libdl)
-
-int
-dladdr (const void *address, Dl_info *info)
-{
- return __dladdr (address, info);
-}
-
-#else
+#include <shlib-compat.h>
int
__dladdr (const void *address, Dl_info *info)
{
-# ifdef SHARED
+#ifdef SHARED
if (!rtld_active ())
return _dlfcn_hook->dladdr (address, info);
-# endif
+#endif
return _dl_addr (address, info, NULL, NULL);
}
-# ifdef SHARED
-strong_alias (__dladdr, dladdr)
-# endif
+versioned_symbol (libc, __dladdr, dladdr, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libdl, GLIBC_2_0, GLIBC_2_34)
+compat_symbol (libdl, __dladdr, dladdr, GLIBC_2_0);
#endif
diff --git a/dlfcn/sdladdr.c b/dlfcn/sdladdr.c
deleted file mode 100644
index c484d63..0000000
--- a/dlfcn/sdladdr.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "dladdr.c"