Why symbols in libdl has a default version GLIBC_2.2.5
Fengkai Sun
qcloud1014@gmail.com
Wed Sep 2 14:48:10 GMT 2020
Hi list,
I've inspected the version of symbols in libdl:
$ nm --dynamic --with-symbol-version /lib/x86_64-linux-gnu/libdl-2.27.so |
grep "T "
0000000000001850 T dladdr@@GLIBC_2.2.5
0000000000001880 T dladdr1@@GLIBC_2.3.3
0000000000001080 T dlclose@@GLIBC_2.2.5
0000000000001470 T dlerror@@GLIBC_2.2.5
00000000000019b0 T dlinfo@@GLIBC_2.3.3
0000000000001b40 T dlmopen@@GLIBC_2.3.4
0000000000000fe0 T dlopen@@GLIBC_2.2.5
00000000000010f0 T dlsym@@GLIBC_2.2.5
However, in dlfcn/Versions the symbols are defined as follows:
libdl {
GLIBC_2.0 {
dladdr; dlclose; dlerror; dlopen; dlsym;
}
GLIBC_2.1 {
dlopen; dlvsym;
}
GLIBC_2.3.3 {
dladdr1; dlinfo;
}
GLIBC_2.3.4 {
dlmopen;
}
GLIBC_PRIVATE {
_dlfcn_hook;
__libdl_freeres;
}
}
which does not show a "GLIBC_2.2.5" section.
After some searching I found in
sysdeps/unix/sysv/linux/x86_64/64/shlib-versions has a default
definition that might overwrite the earlier ones. But shouldn't the name of
the versions be arbitrary and implies no order? I'm really confused.
Many thanks,
Fengkai
More information about the Libc-help
mailing list