Previously, we were printing only the name of the library that we failed to
open. Now, we also print the underlying cause for the failure, (as reported
by dlerror).
exit (1);
}
+ dlerror ();
wrapper_handle = dlopen (path, RTLD_LAZY);
if (wrapper_handle == NULL) {
- fprintf (stderr, "Error: Failed to dlopen %s\n", path);
+ const char *error = dlerror();
+ fprintf (stderr, "Error: Failed to dlopen %s: %s\n", path, error);
exit (1);
}
}