ldd alternative

Today is the day of revelations. I found out that “ldd” is actually a script instead of a binary. Figured it out while finding an equivalent cross-compiled version of it and failed. While finding out what is the package which ships the ldd script, I got to know a command (which only works on fedora/red-had i suppose).

# rpm -qf /usr/bin/ldd

That was cool. Then went about reading the man page for “ldd” and got to know an alternative to ldd which is much safer (as mentioned in manual itself) which is to run objdump. Here is the alternative command:

objdump -p  | grep NEEDED

This works quite well with a toolchain for ARM to identify the libraries linked to a binary. Nice!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s