diff options
Diffstat (limited to 'dlfcn')
-rw-r--r-- | dlfcn/Makefile | 3 | ||||
-rw-r--r-- | dlfcn/Versions | 6 | ||||
-rw-r--r-- | dlfcn/dladdr1.c | 22 | ||||
-rw-r--r-- | dlfcn/sdladdr1.c | 1 |
4 files changed, 14 insertions, 18 deletions
diff --git a/dlfcn/Makefile b/dlfcn/Makefile index f7ffd242dc..1dfa247538 100644 --- a/dlfcn/Makefile +++ b/dlfcn/Makefile @@ -21,12 +21,13 @@ include ../Makeconfig headers := bits/dlfcn.h dlfcn.h extra-libs := libdl -libdl-routines := dlopen dlvsym dladdr1 dlinfo \ +libdl-routines := dlopen dlvsym dlinfo \ dlfcn routines := $(patsubst %,s%,$(filter-out dlfcn,$(libdl-routines))) elide-routines.os := $(routines) routines += \ dladdr \ + dladdr1 \ dlclose \ dlerror \ dlmopen \ diff --git a/dlfcn/Versions b/dlfcn/Versions index 584035e203..acd9402b34 100644 --- a/dlfcn/Versions +++ b/dlfcn/Versions @@ -5,10 +5,14 @@ libc { dlerror; dlsym; } + GLIBC_2.3.3 { + dladdr1; + } GLIBC_2.3.4 { dlmopen; } GLIBC_2.34 { + dladdr1; dladdr; dlclose; dlerror; @@ -29,7 +33,7 @@ libdl { dlopen; dlvsym; } GLIBC_2.3.3 { - dladdr1; dlinfo; + dlinfo; } GLIBC_2.3.4 { __libdl_version_placeholder; 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 diff --git a/dlfcn/sdladdr1.c b/dlfcn/sdladdr1.c deleted file mode 100644 index a655979bcf..0000000000 --- a/dlfcn/sdladdr1.c +++ /dev/null @@ -1 +0,0 @@ -#include "dladdr1.c" |