Oh, I see.  But then, should we check file existence at all?  We are duplicating work done by dlopen after all.  Shouldn't we just see if we get a handle using all the paths?  Sure, we cannot distinguish between "file is there but doesn't get loaded" and "file doesn't get loaded because it is not there".

But for proper error reporting, we could store the dlerror() string that corresponds to every path.  If we don't get a handle eventually, we can report all paths and their linker errors.