]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Replace RTLD_LOCAL with RTLD_GLOBAL
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 2 Apr 2012 16:23:59 +0000 (17:23 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 24 May 2012 12:18:00 +0000 (13:18 +0100)
Since we have drivers which depend on each other (ie QEMU/LXC
depend on the network driver APIs), we need to use RTLD_GLOBAL
instead of RTLD_LOCAL. While this pollutes the calling binary
with many more symbols, this is no worse than if we directly
link to the drivers, and this only applies to libvirtd

* src/driver.c: s/RTLD_LOCAL/RTLD_GLOBAL/

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/driver.c

index 50342778389100c525b143a241cbcb80a27fa2ee..fb162e0ec96d8ebb2a57f7cb416d58035da75df5 100644 (file)
@@ -59,7 +59,7 @@ virDriverLoadModule(const char *name)
         goto cleanup;
     }
 
-    handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL);
+    handle = dlopen(modfile, RTLD_NOW | RTLD_GLOBAL);
     if (!handle) {
         VIR_ERROR(_("failed to load module %s %s"), modfile, dlerror());
         goto cleanup;