How to display the dependency of a dynamic library

Source: Internet
Author: User

In x86 environment:

Root@192.168.1.197:/usr/bin # LDD/usr/lib/libglib-2.0.so.
Linux-gate.so.1 => (0x00ccc000)
Libpcre. so.3 =>/lib/libpcre. so.3 (0x00110000)
Libc. so.6 =>/lib/tls/i686/cmov/libc. so.6 (0x0054a000)
/Lib/ld-linux.so.2 (0x00840000)

In the arm environment, the dependency of the dynamically shared libraries that are compiled by each other is displayed.

Root@192.168.1.197:/root/QT/output/Qt-arm/lib # arm-None-Linux-gnueabi-readelf-D libqtcore. So

Dynamic section at offset 0x2b1260 contains 33 entries:
Tag type name/value
0x00000001 (needed) Shared Library: [libts-0.0.so.0]
0x00000001 (needed) Shared Library: [librt. so.1]
0x00000001 (needed) Shared Library: [libpthread. so.0]
0x00000001 (needed) Shared Library: [libdl. so.2]
0x00000001 (needed) Shared Library: [libstdc ++. so.6]
0x00000001 (needed) Shared Library: [libm. so.6]
0x00000001 (needed) Shared Library: [libgcc_s.so.1]
0x00000001 (needed) Shared Library: [libc. so.6]
0x0000000e (soname) Library soname: [libqtcore. so.4]
0x0000000f (rpath) Library rpath: [/root/QT/output/Qt-arm/lib]
0x0000000c (init) 0x68c6c
0x0000000d (fini) 0x1dfaf4
0x00000019 (init_array) 0x2b3000
0x0000001b (init_arraysz) 12 (bytes)
0x0000001a (fini_array) 0x2b300c
0x0000001c (fini_arraysz) 4 (bytes)
0x00000004 (hash) 0x114
0x00000005 (strtab) 0x20dd4
0x00000006 (symtab) 0x83a4
0x0000000a (strsz) 227242 (bytes)
0x0000000b (syment) 16 (bytes)
0x00000003 (pltgot) 0x2b9388
0x00000002 (pltrelsz) 23984 (bytes)
0x00000014 (pltrel) REL
0x00000017 (jmprel) 0x62ebc
0x00000011 (rel) 0x5b7c4
0x00000012 (relsz) 30456 (bytes)
0x00000013 (relent) 8 (bytes)
0x6ffffffe (verneed) 0x5b6c4
0x6fffffff (verneednum) 7
0x6ffffff0 (versym) 0x5857e
0x6ffffffa (relcount) 787
0x00000000 (null) 0x0
Root@192.168.1.197:/root/QT/output/Qt-arm/lib #

The command for displaying dependencies *** readelf is related to the Cross Compiler:

Or use arm-Linux-readelf-D *. So

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.