Re:Never run ldd on unknown executables
by eqvinox on Sunday July 23, 2023 @07:20PM
(#36841029)
Yes. So is the (IMHO) best workaround of using lddtree (pax-utils) instead. Available on pretty much all distros, though probably not installed by default.
[ Parent
| on HN ]
objdump -x /path/to/bin | grep NEEDED
Doesn't tell you if/where the library is found on your system.
for i in $(objdump -p /path/to/bin | grep NEEDED | awk '{print $2}'); do ldconfig -p | awk -v var="$i" '$1==var{print $0}'; done
Cool, but I think I'll stick to lddtree ;)
(… it also recurses down on the dependencies, presumably you can extend your shell script to do that too but at some point why not just use the existing tools?)