[libvirt] [PATCH 05/10] Replace RTLD_LOCAL with RTLD_GLOBAL

Eric Blake eblake at redhat.com
Tue May 22 03:38:34 UTC 2012


On 05/21/2012 01:59 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> 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 at redhat.com>
> ---
>  src/driver.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/driver.c b/src/driver.c
> index 5034277..fb162e0 100644
> --- a/src/driver.c
> +++ b/src/driver.c
> @@ -59,7 +59,7 @@ virDriverLoadModule(const char *name)
>          goto cleanup;
>      }
>  
> -    handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL);
> +    handle = dlopen(modfile, RTLD_NOW | RTLD_GLOBAL);

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120521/eb2c1923/attachment-0001.sig>


More information about the libvir-list mailing list