How to list imported symbols in ELF executable?
Try objdump -T 'ELF-file'
The output from objdump is a little excessive for this purpose, and requires a good bit of parsing to find the actual imports.
I prefer readelf for this purpose:
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]
As you can see, the required libraries are marked with "NEEDED".
I prefer readelf
.
readelf -s <file>