问个动态链接(ldconfig)的问题
#/etc/ld.so.conf文件的内容:
include ld.so.conf.d/*.conf
说明配置文件包括/etc/ld.so.conf.d/下的所有.conf文件。
所以我接着做了以下操作:
[nagios@NetMonitor ~]$ cat /etc/ld.so.conf.d/*.conf
# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 0 set in their hwcap match
# fields. In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 0 nosegneg
/usr/lib/qt-3.3/lib
配置文件只指定了一个目录,我查看了这个目录中的文件:
[root@NetMonitor ~]# ls /usr/lib/qt-3.3/lib/
libqt-mt.so.3 libqt-mt.so.3.3 libqt-mt.so.3.3.6 libqui.so.1 libqui.so.1.0 libqui.so.1.0.0
一共只有6个文件。
但是执行下面的操作:
[root@NetMonitor ~]# ldconfig -p | wc -l
630
也就是说,系统一共加载了629个动态链接对象(第一行不算,是一个title)。
但是配置文件只指定了6个动态链接对象。
我想知道,其他的这些文件,是根据什么样的规则加载的?就是说,系统怎么知道一定要加载这些文件?
难道还有其他的地方可以配置更高优先级的加载么?
include ld.so.conf.d/*.conf
说明配置文件包括/etc/ld.so.conf.d/下的所有.conf文件。
所以我接着做了以下操作:
[nagios@NetMonitor ~]$ cat /etc/ld.so.conf.d/*.conf
# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 0 set in their hwcap match
# fields. In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 0 nosegneg
/usr/lib/qt-3.3/lib
配置文件只指定了一个目录,我查看了这个目录中的文件:
[root@NetMonitor ~]# ls /usr/lib/qt-3.3/lib/
libqt-mt.so.3 libqt-mt.so.3.3 libqt-mt.so.3.3.6 libqui.so.1 libqui.so.1.0 libqui.so.1.0.0
一共只有6个文件。
但是执行下面的操作:
[root@NetMonitor ~]# ldconfig -p | wc -l
630
也就是说,系统一共加载了629个动态链接对象(第一行不算,是一个title)。
但是配置文件只指定了6个动态链接对象。
我想知道,其他的这些文件,是根据什么样的规则加载的?就是说,系统怎么知道一定要加载这些文件?
难道还有其他的地方可以配置更高优先级的加载么?
...全文
相关推荐
浅谈Linux中ldconfig和ldd的用法
下面小编就为大家带来一篇浅谈Linux中ldconfig和ldd的用法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
Linux下动态链接库加载路径及搜索路径问题
主要介绍了Linux下动态链接库加载路径及搜索路径问题,需要的朋友可以参考下
为什么ldconfig后,会自动生成so的软链接 ldconfig就会生成librudp.so软连接
为什么ldconfig后,会自动生成so的软链接 ldconfig就会生成librudp.so软连接
linux动态链接的基本知识
介绍了linux动态链接的基本过程。附带有操作的截图演示
linux下动态链接库的使用方法
文档详细介绍了Linux下动态链接库的生产以及连接方法,对于从事Linux C/C++的技术开发人员有一定帮助


