linux下查看动态链接库依赖关系的命令 
x86:
ldd    *.so

arm:
arm-linux-readelf    -d    *.so

实际例子:
以项目中用到的库librtsp.so分析:
lijun@ubuntu:~/workspace$ arm-hisiv100nptl-linux-ld -d librtsp.so 
arm-hisiv100nptl-linux-ld: warning: liblog.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libcutils.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libutils.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libbinder.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libssl.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libcrypto.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libgui.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libmedia.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libstagefright_foundation.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libc.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: libstdc++.so, needed by librtsp.so, not found (try using -rpath or -rpath-link)
arm-hisiv100nptl-linux-ld: warning: cannot find entry symbol _start; defaulting to 00008204
librtsp.so: undefined reference to `__aeabi_unwind_cpp_pr0'
librtsp.so: undefined reference to `operator new[](unsigned int)'
librtsp.so: undefined reference to `__sF'
librtsp.so: undefined reference to `operator delete[](void*)'
librtsp.so: undefined reference to `_Unwind_Resume_or_Rethrow'
librtsp.so: undefined reference to `_Unwind_VRS_Get'
librtsp.so: undefined reference to `_toupper_tab_'
librtsp.so: undefined reference to `__gnu_unwind_frame'
librtsp.so: undefined reference to `__memset_chk'
librtsp.so: undefined reference to `pthread_key_create'
librtsp.so: undefined reference to `_Unwind_RaiseException'
librtsp.so: undefined reference to `__strcat_chk'
librtsp.so: undefined reference to `operator delete(void*)'
librtsp.so: undefined reference to `__aeabi_unwind_cpp_pr1'
librtsp.so: undefined reference to `_tolower_tab_'
librtsp.so: undefined reference to `__cxa_pure_virtual'
librtsp.so: undefined reference to `_Unwind_VRS_Set'
librtsp.so: undefined reference to `_Unwind_GetLanguageSpecificData'
librtsp.so: undefined reference to `__android_log_print'
librtsp.so: undefined reference to `pthread_getspecific'
librtsp.so: undefined reference to `_Unwind_Resume'
librtsp.so: undefined reference to `__strlen_chk'
librtsp.so: undefined reference to `_ctype_'
librtsp.so: undefined reference to `__isthreaded'
librtsp.so: undefined reference to `_Unwind_Complete'
librtsp.so: undefined reference to `_Unwind_DeleteException'
librtsp.so: undefined reference to `_Unwind_GetTextRelBase'
librtsp.so: undefined reference to `__aeabi_uldivmod'
librtsp.so: undefined reference to `__swbuf'
librtsp.so: undefined reference to `_Unwind_GetDataRelBase'
librtsp.so: undefined reference to `pthread_key_delete'
librtsp.so: undefined reference to `__sprintf_chk'
librtsp.so: undefined reference to `_Unwind_GetRegionStart'
librtsp.so: undefined reference to `__errno'
librtsp.so: undefined reference to `operator new(unsigned int)'
librtsp.so: undefined reference to `pthread_setspecific

lijun@ubuntu:~/workspace$ arm-hisiv100nptl-linux-readelf -d librtsp.so

Dynamic section at offset 0x93c14 contains 34 entries:
  Tag        Type                         Name/Value
 0x00000003 (PLTGOT)                     0x94e34
 0x00000002 (PLTRELSZ)                   896 (bytes)
 0x00000017 (JMPREL)                     0x40a08
 0x00000014 (PLTREL)                     REL
 0x00000011 (REL)                        0x37eb8
 0x00000012 (RELSZ)                      35664 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffa (RELCOUNT)                   4380
 0x00000006 (SYMTAB)                     0x114
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000005 (STRTAB)                     0xe264
 0x0000000a (STRSZ)                      148452 (bytes)
 0x00000004 (HASH)                       0x32648
 0x00000001 (NEEDED)                     Shared library: [liblog.so]
 0x00000001 (NEEDED)                     Shared library: [libcutils.so]
 0x00000001 (NEEDED)                     Shared library: [libutils.so]
 0x00000001 (NEEDED)                     Shared library: [libbinder.so]
 0x00000001 (NEEDED)                     Shared library: [libssl.so]
 0x00000001 (NEEDED)                     Shared library: [libcrypto.so]
 0x00000001 (NEEDED)                     Shared library: [libgui.so]
 0x00000001 (NEEDED)                     Shared library: [libmedia.so]
 0x00000001 (NEEDED)                     Shared library: [libstagefright_foundation.so]
 0x00000001 (NEEDED)                     Shared library: [libc.so]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so]
 0x00000001 (NEEDED)                     Shared library: [libm.so]
 0x0000000e (SONAME)                     Library soname: [librtsp.so]
 0x0000001a (FINI_ARRAY)                 0x90084
 0x0000001c (FINI_ARRAYSZ)               4 (bytes)
 0x00000019 (INIT_ARRAY)                 0x90088
 0x0000001b (INIT_ARRAYSZ)               36 (bytes)
 0x00000010 (SYMBOLIC)                   0x0
 0x0000001e (FLAGS)                      SYMBOLIC BIND_NOW
 0x6ffffffb (FLAGS_1)                    Flags: NOW
 0x00000000 (NULL)                       0x0
 
 
参考:
apk相关和loadLibrary详解 
http://www.cnblogs.com/lijunamneg/archive/2012/11/30/2795577.html

Linux的nm查看动态和静态库中的符号 
http://www.cnblogs.com/itech/archive/2012/09/16/2687423.html

Linux命令学习手册-readelf命令 
http://blog.chinaunix.net/uid-9525959-id-2001833.html

eCos编译Synthethic Target程序时无法解析__sprintf_chk的解决办法 
http://blog.csdn.net/zoomdy/article/details/10615853

linux下查看动态链接库依赖关系的命令 x86: ldd *.so arm: arm-linux-readelf -d *.so 实际例子: 以项目中用到的库librtsp.so分析: lijun@ubuntu:~/workspace$ arm-hisiv100nptl-linux-ld -d librtsp.so arm-hisiv100nptl-linux-ld:的更多相关文章

  1. linux下查看动态链接库so文件的依赖的相关组建

    我们很多c程序在windows下是以dll形式展现的,在linux则是以so 形式展现的. windows一般不会因为编译dll文件的编译器版本不同而出先dll文件不能执行. 但是linux下,不同版 ...

  2. Linux下查看history里的某种命令

    Linux下,直接键入history命令,会将当前账户此前所有的命令都显示出来,未免太多了些.如果我只想查找某种命令,怎么办? 比如说,我只想查找我之前运行过的 "git" 命令 ...

  3. linux下查看硬件配置的相关命令

    from:http://www.jakee.cn/index.php/archives/501.html 常用命令整理如下:查看主板的序列号: dmidecode | grep -i ’serial ...

  4. Linux下查看设设置时间date命令

    查看时间 # date "+%Y_%m_%d  %H-%M-%S" 设置时间 #date -s "2018-05-17 09:51:50" //写入到硬件时钟 ...

  5. Linux下查看使用频率最高的十个命令

    这个shell是在linux吧一个小伙伴发的,链接已找不到,挺有意思的,隔段时间运行一次,可以看看自己最近都干了什么. [shell] history | awk '{CMD[$2]++;count+ ...

  6. Linux网络——查看网络连接情况的命令

    Linux网络——查看网络连接情况的命令 摘要:本文主要学习了Linux中用来查看网络连接情况的命令. hostname命令 hostname命令用于显示和设置系统的主机名称,设置只是临时生效,永久生 ...

  7. linux下查看进程占用端口和端口占用进程命令

    Linux下查看进程占用端口: 查看程序对应进程号:ps –ef|grep 进程名 REDHAT :查看进程号所占用的端口号:netstat –nltp|grep 进程号 ubuntu:查看进程占用端 ...

  8. linux下查看内存的命令

    top能显示系统内存.我们常用的Linux下查看内容的专用工具是free命令. 下面是对内存查看free命令输出内容的解释: total:总计物理内存的大小. used:已使用多大. free:可用有 ...

  9. linux下查看当前用户的 三个命令

    linux下查看当前用户的 三个命令 1,whoami; 2,id -un; 3,who -H  可以列出当前所有的    NAME (用户名)    LINE (窗口列表)    TIME(开启时间 ...

随机推荐

  1. recyclerview23+出现多个item只显示第一个item的问题

    1.改成21+可以,如果不行,就使用第2或第3个解决方案 2.对每个item的inflate,传入两个参数,第二个参数设置为null,而不是使用3个参数(第二个parent,第三个false) 3.i ...

  2. ajax处理响应(三)

        一旦脚本调用了send方法,浏览器就会在后台发送请求到浏览器.因为请求是在后台处理的,所以Ajax依靠事件来通知你这个请求的进度的进展情况,在上个随笔的里,使用handleResponse函数 ...

  3. BZOJ4712: 洪水(树链剖分维护Dp)

    Description 小A走到一个山脚下,准备给自己造一个小屋.这时候,小A的朋友(op,又叫管理员)打开了创造模式,然后飞到 山顶放了格水.于是小A面前出现了一个瀑布.作为平民的小A只好老实巴交地 ...

  4. Mac使用Docker-machine訪问docker publish port

    Step 1.Export the port in your container(docker-machine or boot2docker) 首先,要保证你公布port的image已经run起来了. ...

  5. [Angular & Unit Testing] Automatic change detection

    When you testing Component rendering, you often needs to call: fixture.detectChanges(); For example: ...

  6. 阿里云 CentOS7.4 环境安装nginx

    下载 nginx地址: http://nginx.org/en/download.html Mainline version可以理解为开发版本 Stable version 稳定版 Legacy ve ...

  7. read()方法读取的是一个字节,为什么返回是int,而不是byte

    因为字节输入流可以操作任意类型的文件,比如图片音频等,这些文件底层都是以二进制形式的存储的,如果每次读取都返回byte,有可能在读到中间的时候遇到111111111                 那 ...

  8. Linux下软件安装

    1.apt-get安装 自动下载依赖包.全程自动安装.但不能指定安装的位置 xiaohuang@xiaohuang-virtual-machine:~$ sudo apt-get install sl ...

  9. python 时间合集 一

    **以下内容均为我个人的理解,如果发现错误或者疑问可以联系我共同探讨**#### python中4种时间表示形式:1.格式化时间字符串 2.时间戳 3.时间元祖 4.时间对象- string_time ...

  10. 感谢党,软考过了。系统集成项目管理project师

    人品爆发了,刚用干巴巴的日语做完2小时的设计说明,回到家一查,人品爆发了.软考竟然过了. 绝对是评卷老师给人品啊!真想请他吃顿饭. 系统集成项目管理project师  64 53 幸运飞过! 今天真是 ...