dylib icon indicating copy to clipboard operation
dylib copied to clipboard

List all loadable symbols in dylib

Open bugdea1er opened this issue 11 months ago • 2 comments

Hi there!

In my use case, I need to load multiple dylibs globally at the same time. I want to be able to check if these dylibs have conflicting symbols, so I need a way to list all defined exported symbols to compare them with other libs I want to load.

Something similar can be done using dlinfo on Linux, but I need a cross-platform solution.

What do you think?

bugdea1er avatar Mar 14 '24 08:03 bugdea1er

Hello @bugdea1er,

Yes, it is the next feature i wanted to implement:

std::vector<std::string> symbols(const std::string &section = "");

I will start working on that soon.

martin-olivier avatar May 02 '24 11:05 martin-olivier

Hello @bugdea1er,

Sorry for the long delay, I have implemented the listing of symbols in the dev branch.

Currently, It has a boolean parameter 'demangle' if you want to get raw or demangled symbols name.

I will also add soon another parameter 'loadable' that will return only symbols that can be loaded.

martin-olivier avatar Jul 24 '24 13:07 martin-olivier