Linux动态加载库剖析

问题:

  在程序测试中发现报下面的这个错误

   soxmix: error while loading shared libraries: libippsc.so: cannot open shared object file: No such file or directory

  这个程序是在64位平台下进行的编译,64位平台的库的名字已及路径: /opt/intel/ipp41/em64t/sharedlib/libippscem64t.so  

在Makefile编译时的链接环境:

IPPROOT = /opt/intel/ipp41/em64t
LIB_G729  = -L./libg729 -L$(IPPROOT)/sharedlib -L$(IPPROOT)/sharedlib/linuxem64t -lg729 -lippscem64t -lipp
ld.so.conf内容:
include ld.so.conf.d/*.conf
/opt/intel/ipp41/em64t/sharedlib
/opt/intel/ipp41/em64t/sharedlib/linuxem64t
使用readelf  -d soxmix 命令查看库的链接情况:

 

[root@localhost src]# readelf -d soxmix
Dynamic section at offset 0x914f0 contains 33 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libvorbisfile.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libvorbisenc.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libvorbis.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libogg.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libmad.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libmp3lame.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libippscem64t.so]
 0x0000000000000001 (NEEDED)             Shared library: [libippsrem64t.so]
 0x0000000000000001 (NEEDED)             Shared library: [libippsem64t.so]
 0x0000000000000001 (NEEDED)             Shared library: [libippcoreem64t.so]
 0x0000000000000001 (NEEDED)             Shared library: [libguide.so]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000c (INIT)               0x403118
 0x000000000000000d (FINI)               0x452c18
 0x000000006ffffef5 (GNU_HASH)           0x400240
 0x0000000000000005 (STRTAB)             0x4013e0
 0x0000000000000006 (SYMTAB)             0x4002a0
 0x000000000000000a (STRSZ)              2732 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000015 (DEBUG)              0x0
 0x0000000000000003 (PLTGOT)             0x691758
 0x0000000000000002 (PLTRELSZ)           4104 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x402110
 0x0000000000000007 (RELA)               0x402080
 0x0000000000000008 (RELASZ)             144 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x402000
 0x000000006fffffff (VERNEEDNUM)         3
 0x000000006ffffff0 (VERSYM)             0x401e8c
 0x0000000000000000 (NULL)               0x0

上述问题已经链接上。
   关于动态链接库相关的一些资料的路径:

技巧:Linux 动态库与静态库制作及使用详解

Linux 动态库剖析

程序编译运行时头文件或动态链接库的查找

 

 

关于ld.so.conf 内容介绍

需要说明的是/etc/ld.so.conf文件是记录了动态加载库的路径。下面是两篇文章的介绍:

1、  http://blog.csdn.net/yjkwf/article/details/7545002

2、  http://blog.sina.com.cn/s/blog_7137890701013rth.html

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值