Tuesday, September 08, 2009

ldd equivalent under Darwin (OS X)

ldd is an incredibly useful command under linux. It lists the shared-libraries required by an executable, and exactly which .so file each dependency is currently resolved to.

A similarly useful tool is od, which permits inspection of object files, especially executable and shared-libraries, extracting things like the string-table, symbol-table, and various headers and sections.

Under Darwin these tools are combined in otool. ldd can be duplicated by otool -L.

8 comments:

TimC said...

Since every other unix of importance already has ldd, wouldn't it have been more sensible of them to also have an ldd?

Andrae Muys said...

I've done C development under several unixes, and their binary toolchains are wide and varied. In my experience ldd is far from universal, and identifying which tools are available on your specific unix is one of the quirks of shifting platform.

I'm not bothered by it, this wasn't a complaint. I just wanted to capture this piece of info for my own benefit, and made it public on the off chance it might help someone else.

faldridge said...

It helped me. Thanks for posting!

paul sam said...

Everyone here has the sense that right now is one of those moments when we are influencing the future.
Electrician Marbella

get rid of cellulite said...

What I wouldn’t give to learn how you got your design to be so amazing ! I mean it. Besides the blog just being awesome, this page is too sweet !
schifffonds

M RAZA ABBAS said...

Very nice and useful information. Why not write a book about this particular subject. For today’s economic variation and be short of of opportunities, it actually will be a very hot topic. Thanks a lot
Trap

ROSEMARY CARLA said...

Thanks for sharing. Learn a lot from your Blog.I really enjoyed reading it, you may be a great author.I must say you've done a wonderful job by sharing your article with us. XPS Analysis

Wilson Davis said...

Nice Blog! Thanks for sharing. Blackbox penetration testing