aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-19 14:41:10 +0000
committerRoy Marples <roy@marples.name>2007-04-19 14:41:10 +0000
commit3ed60d52026c484dce2d1856ea3bb893b8ee7d92 (patch)
tree81adeec951327072f11f3cafe3000811d0f50269
parent026926fc4f4ce686305762da6f84daae5692a33c (diff)
Use RTLD_NOW instead of RTLD_LAZY
-rw-r--r--src/rc-plugin.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rc-plugin.c b/src/rc-plugin.c
index 15ab149d..d5476c81 100644
--- a/src/rc-plugin.c
+++ b/src/rc-plugin.c
@@ -43,13 +43,18 @@ void rc_plugin_load (void)
files = rc_ls_dir (NULL, RC_PLUGINDIR, 0);
STRLIST_FOREACH (files, file, i) {
char *p = rc_strcatpaths (RC_PLUGINDIR, file, NULL);
- void *h = dlopen (p, RTLD_LAZY);
+ /*
+ * We load the use RTLD_NOW so that we know it works
+ * as if we have any unknown symbols when we run then the
+ * program bails out in rc_plugin_run which is very very bad.
+ */
+ void *h = dlopen (p, RTLD_NOW);
char *func;
void *f;
int len;
if (! h) {
- eerror ("dlopen `%s': %s", p, dlerror ());
+ eerror ("dlopen: %s", dlerror ());
free (p);
continue;
}