OSDN Git Service

* config/i386/sse.md (copysign<mode>3): Allocate registers only for
[pf3gnuchains/gcc-fork.git] / gcc / plugin.c
index f657850..9060683 100644 (file)
@@ -592,7 +592,11 @@ try_init_one_plugin (struct plugin_name_args *plugin)
   char *err;
   PTR_UNION_TYPE (plugin_init_func) plugin_init_union;
 
-  dl_handle = dlopen (plugin->full_name, RTLD_NOW);
+  /* We use RTLD_NOW to accelerate binding and detect any mismatch
+     between the API expected by the plugin and the GCC API; we use
+     RTLD_GLOBAL which is useful to plugins which themselves call
+     dlopen.  */
+  dl_handle = dlopen (plugin->full_name, RTLD_NOW | RTLD_GLOBAL);
   if (!dl_handle)
     {
       error ("Cannot load plugin %s\n%s", plugin->full_name, dlerror ());