x86 platform has LDD can be very convenient to view the dependencies of the library, but in the embedded Linux environment does not have this command, instead of it is
cc=$ (cross_compile) gcc
ldd=$ (Cross_compile) readelf
Example
[Plain]View PlainCopy
- $ (cross_compile) readelf-d Sdkdemo_video
- Dynamic section at offset 0x1a88 contains entries:
- Tag Type Name/value
- 0x00000001 (NEEDED) Shared library: [libtxdevicesdk.so]
- 0x00000001 (NEEDED) Shared library: [libpthread.so.0]
- 0x00000001 (NEEDED) Shared library: [libdl.so.0]
- 0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
- 0x00000001 (NEEDED) Shared library: [libc.so.0]
- 0x0000000c (INIT) 0x87cc
- 0x0000000d (FINI) 0x96d0
- 0x00000019 (Init_array) 0x11a7c
- 0X0000001B (Init_arraysz) 4 (bytes)
- 0X0000001A (Fini_array) 0x11a80
- 0X0000001C (Fini_arraysz) 4 (bytes)
- 0x00000004 (HASH) 0x8108
- 0x00000005 (Strtab) 0x84ec
- 0x00000006 (Symtab) 0x824c
- 0x0000000a (Strsz) (bytes)
- 0X0000000B (syment) (bytes)
- 0x00000015 (DEBUG) 0x0
- 0x00000003 (Pltgot) 0x11b60
- 0x00000002 (pltrelsz) 224 (bytes)
- 0x00000014 (Pltrel) REL
- 0x00000017 (Jmprel) 0x86ec
- 0x00000000 (NULL) 0x0
LDD under the embedded platform