Returning a shared library symbol table
- by joemoe
For instance:
void* sdl_library = dlopen("libSDL.so", RTLD_LAZY);
void* initializer = dlsym(sdl_library,"SDL_Init");
Assuming no errors, initializer will point to the function SD_Init in the shared library libSDK.so.
However this requires knowing the symbol "SDL_Init" exists.
Is it possibly to query a library for all its symbols? Eg, in this case it would return SDL_Init, the function pointer, and any other symbols exported by libSDL.so.