Command for viewing the dependency of a dynamic link library

Source: Internet
Author: User

Command for viewing the dependency between dynamic link libraries in Linux
X86:
LDD *. So

Arm:
Arm-Linux-readelf-D *. So


Example:
Use the library librtsp. So used in the project for analysis:
[Email protected]: ~ /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


[Email protected]: ~ /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
 
 
Refer:
APK and loadlibrary
Http://www.cnblogs.com/lijunamneg/archive/2012/11/30/2795577.html

Linux nm viewing symbols in dynamic and static libraries
Http://www.cnblogs.com/itech/archive/2012/09/16/2687423.html

Linux Command learning manual-readelf command
Http://blog.chinaunix.net/uid-9525959-id-2001833.html

How to resolve _ sprintf_chk when the target program of synthethic is compiled by ECOs
Http://blog.csdn.net/zoomdy/article/details/10615853

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.