From 3ed60d52026c484dce2d1856ea3bb893b8ee7d92 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 19 Apr 2007 14:41:10 +0000 Subject: Use RTLD_NOW instead of RTLD_LAZY --- src/rc-plugin.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3