4 ms·
Or even more basic: $ eu-readelf -d /bin/ls | grep NEEDED NEEDED Shared library: [libselinux.so.1] NEEDED Shared library: [libcap.s
by rwmj 5y ago
Or even more basic:
$ eu-readelf -d /bin/ls | grep NEEDED
NEEDED Shared library: [libselinux.so.1]
NEEDED Shared library: [libcap.so.2]
NEEDED Shared library: [libc.so.6]
Of course the trick is doing it recursively and having nice output.
- IshKebab 5y agoThat's not the same. ldd actually finds the libraries and their dependencies.
- rwmj 5y agoOf course. I'm just pointing out how the source data is encoded in the ELF file. As I said in the comment there is much value in the tools that take this data and the locations of the libraries and build up a nice tree.
- IshKebab 5y agoIt's not though, an ELF file only lists its immediate dependencies. To find the complete tree you actually need to find the dependencies and parse those, which is exactly what this does.
- deleted 5y ago[deleted]