]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: prevent unloading of all public libraries
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 19 Apr 2018 14:14:04 +0000 (15:14 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 24 Apr 2018 15:58:03 +0000 (16:58 +0100)
We previously added "-z nodelete" to the build of libvirt.so to prevent
crashes when thread local destructors run which point to a code that
has been dlclose()d:

  commit 8e44e5593eb9b89fbc0b54fde15f130707a0d81e
  Author: Daniel P. Berrange <berrange@redhat.com>
  Date:   Thu Sep 1 17:57:06 2011 +0100

      Prevent crash from dlclose() of libvirt.so

We forgot to copy this protection into the libvirt-qemu.so, libvirt-lxc.so
and libvirt-admin.so libraries when we introduced them.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/Makefile.am

index a6667228b65fd8298bc648b3f8fa65f4317e123b..2f8e5f690861e9e1d5559c22422cf67a69d3034e 100644 (file)
@@ -529,7 +529,9 @@ libvirt_admin_la_SOURCES = \
 libvirt_admin_la_LDFLAGS = \
                $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_ADMIN_SYMBOL_FILE) \
                -version-info $(LIBVIRT_VERSION_INFO) \
-               $(AM_LDFLAGS)
+               $(LIBVIRT_NODELETE) \
+               $(AM_LDFLAGS) \
+               $(NULL)
 
 libvirt_admin_la_LIBADD = \
                libvirt.la \
@@ -644,6 +646,7 @@ libvirt_qemu_la_SOURCES = libvirt-qemu.c
 libvirt_qemu_la_LDFLAGS = \
                $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_QEMU_SYMBOL_FILE) \
                -version-info $(LIBVIRT_VERSION_INFO) \
+               $(LIBVIRT_NODELETE) \
                $(AM_LDFLAGS) \
                $(NULL)
 libvirt_qemu_la_CFLAGS = $(AM_CFLAGS)
@@ -653,6 +656,7 @@ libvirt_lxc_la_SOURCES = libvirt-lxc.c
 libvirt_lxc_la_LDFLAGS = \
                $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_LXC_SYMBOL_FILE) \
                -version-info $(LIBVIRT_VERSION_INFO) \
+               $(LIBVIRT_NODELETE) \
                $(AM_LDFLAGS) \
                $(NULL)
 libvirt_lxc_la_CFLAGS = $(AM_CFLAGS)