在unix环境的x86平台下是ldd,但在嵌入式linux环境中没有这个命令,而是使用 readelf命令
运行mips-linux-readelf -d busybox ,可以看到下面的显示busybox需要4个动态库。这个命令很有用,可以确切知道系统需要哪些动态库,将不需要的库删除,减小嵌入式linux系统的flash的使用。
Dynamic section at offset 0x180 contains 29 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libcrypt.so.0]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.0]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000c (INIT) 0x4046c8
0x0000000d (FINI) 0x44ff20
0x00000004 (HASH) 0x400290
0x00000005 (STRTAB) 0x402dec
0x00000006 (SYMTAB) 0x400e8c
0x0000000a (STRSZ) 5312 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x70000016 (MIPS_RLD_MAP) 0x10001b00
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x10001b50
0x00000011 (REL) 0x4046b8
0x00000012 (RELSZ) 16 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x70000001 (MIPS_RLD_VERSION) 1
0x70000005 (MIPS_FLAGS) NOTPOT
0x70000006 (MIPS_BASE_ADDRESS) 0x400000
0x7000000a (MIPS_LOCAL_GOTNO) 14
0x70000011 (MIPS_SYMTABNO) 502
0x70000012 (MIPS_UNREFEXTNO) 30
0x70000013 (MIPS_GOTSYM) 0xe
0x6ffffffe (VERNEED) 0x404698
0x6fffffff (VERNEEDNUM) 1
0x6ffffff0 (VERSYM) 0x4042ac
阅读(6920) | 评论(0) | 转发(0) |