Answers:
尝试objdump -T'ELF-file'
objdump的输出为此目的有点多余,并且需要大量的解析才能找到实际的导入。
为此,我更喜欢使用readelf:
readelf -d dynamic-buffer-test
Dynamic section at offset 0x630a8 contains 23 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
如您所见,所需的库标记有“ NEEDED”。
objdump -p /path/to/binary | grep NEEDED
。