通过看二进制文件来了解库文件依存关系
时间:2010-06-08 来源:mournjust
今天通过使用0718上的新的编译器来编译UBI的用户工具
但是老是出现:
/bin/sh ubiattach not found
但是可以在/sbin/中找到/sbin/ubiattach文件,为什么呢?
后来问师兄原来是因为缺少库文件。
[root@localhost sbin]# arm-linux-readelf ubiattach
这样可以来查看一些关键信息:
Version symbols section '.gnu.version' contains 37 entries:
Addr: 00000000000085d0 Offset: 0x0005d0 Link: 4 (.dynsym)
000: 0 (*local*) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
004: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 0 (*local*)
008: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
00c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
010: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
014: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
018: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
01c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
020: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
024: 2 (GLIBC_2.4)
Version needs section '.gnu.version_r' contains 1 entries: Addr: 0x000000000000861c Offset: 0x00061c Link to section: 5 (.dynstr) 000000: Version: 1 File: libc.so.6 Cnt: 1 0x0010: Name: GLIBC_2.4 Flags: none Version: 2 这样可以看到ubiattach依赖于libc.so.6库文件,这是一个连接文件。
Version needs section '.gnu.version_r' contains 1 entries: Addr: 0x000000000000861c Offset: 0x00061c Link to section: 5 (.dynstr) 000000: Version: 1 File: libc.so.6 Cnt: 1 0x0010: Name: GLIBC_2.4 Flags: none Version: 2 这样可以看到ubiattach依赖于libc.so.6库文件,这是一个连接文件。
相关阅读 更多 +