A readonly GOT and detecting indirect linkage is useful here too.
---
python/Makefile.am | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/python/Makefile.am b/python/Makefile.am
index 925e1f4..3f967a9 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -28,6 +28,10 @@ INCLUDES = \
$(GETTEXT_CPPFLAGS)
AM_CFLAGS = $(WARN_CFLAGS)
+AM_LDFLAGS = \
+ $(RELRO_LDFLAGS) \
+ $(NO_INDIRECT_LDFLAGS) \
+ $(NULL)
CLASSES_EXTRA = \
libvirt-override-virConnect.py \
@@ -74,6 +78,7 @@ libvirtmod_la_CFLAGS = $(WARN_CFLAGS) $(WARN_PYTHON_CFLAGS)
libvirtmod_la_LDFLAGS = -module -avoid-version -shared \
-L$(top_builddir)/src/.libs \
+ $(AM_LDFLAGS) \
$(CYGWIN_EXTRA_LDFLAGS)
libvirtmod_la_LIBADD = $(mylibs) \
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
@@ -86,6 +91,7 @@ libvirtmod_qemu_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
libvirtmod_qemu_la_LDFLAGS = -module -avoid-version -shared \
-L$(top_builddir)/src/.libs \
+ $(AM_LDFLAGS) \
$(CYGWIN_EXTRA_LDFLAGS)
libvirtmod_qemu_la_LIBADD = $(myqemulibs) \
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
@@ -98,6 +104,7 @@ libvirtmod_lxc_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
libvirtmod_lxc_la_LDFLAGS = -module -avoid-version -shared \
-L$(top_builddir)/src/.libs \
+ $(AM_LDFLAGS) \
$(CYGWIN_EXTRA_LDFLAGS)
libvirtmod_lxc_la_LIBADD = $(mylxclibs) \
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
--
1.8.4.rc3