The four functions dlopen(), dlsym(), dlclose(), dlerror() implement the interface tothe dynamic linking loader.
void *dlopen(constchar *filename, int flag);
The function dlopen() loads the dynamic library file named by the null-terminated string filename and returns an opaque "handle"for the dynamic library.
void *dlsym(void *handle, const char *symbol);
The function dlsym() takes a "handle"of a dynamic library returned by dlopen() andthe null-terminated symbol name, returningthe address wherethat symbol is loaded into memory.
int dlclose(void *handle);
The function dlclose() decrements thereferencecountonthe dynamic library handle handle.
If thereferencecount drops to zero and no other loaded libraries use symbols init, thenthe dynamic library is unloaded.
char *dlerror(void);
The function dlerror() returns a human readable string describing the most recent errorthat occurred from dlopen(), dlsym() or dlclose() sincethelast call to dlerror().