Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I want to be able to know what are the symbols that are used from a certain shared library at runtime.
I use gdb and I set the solib-search-path to the user defined shared library. I am not sure if there is another way with ltrace
ltrace -c -l 'yoursharedlib.so*' yourprogram args... will list all the functions called by yourprogram in that shared library. It gives other info, too, so you may need to filter the output with awk. It won't list non-function symbols such as variables. Is that what you need?
ltrace -c -l 'yoursharedlib.so*' yourprogram args...will list all the functions called by yourprogram in that shared library. It gives other info, too, so you may need to filter the output withawk. It won't list non-function symbols such as variables. Is that what you need?