Being sure of your shared objects

This short article is all about how to be sure you know exactly what your application is doing with shared objects.

It can be quite easy sometimes to not know which objects are being used by a program. Sure, you can ldd a binary and find out what it links to, but which order are they being used, and  what about when the program dlopens something, as many do. How can you easilly find out what it is using and how it finds it?

Simply, you can run an application as such:

LD_DEBUG=libs ./yourapp

This will give you pages of output telling you everything that the application is doing with shared objects, and you will note that each time it opens a shared object, it will report this with ‘init’, leaving you able to simply grep to see which .so’s it is using.

Hopefully this helps people that are trying to work out just quite what their apps are doing sometimes!

  • Share/Bookmark

Tags:

One Response to “Being sure of your shared objects”

  1. pim says:

    Thanks,

    this was very helpful

Leave a Reply

To stop spam, please answer this simple question
What OS do we make games for

Please note: This site is fully moderated