This might interest you, it is part of a email exchange Ognyan had
with Roland [bug #4710]:
,
| >>$ ./store x:x # This test program calls store_typed_open.
| >> ./store: cannot load libstore_x.so.0.3: libstore_x.so.0.3: cannot open
| >> shared object file: No such file or directory
| >> store
LOL,
It seems we do detect ENOENT when we can't open a shared lib because
of it not being there. But, we do still have a problem and it is here
mod = dlopen (modname, RTLD_LAZY);
if (mod == NULL)
{
const char *errstring = dlerror (); /* Must always call or it leaks! */