[master] 51542bef0 Filter all but the interface symbol out of vmod shlibs.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Feb 5 08:04:07 UTC 2019
commit 51542bef0fce998fded3899e53745e075a22bb39
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Feb 5 08:03:22 2019 +0000
Filter all but the interface symbol out of vmod shlibs.
Use boilerplate for vmod_debug
diff --git a/.gitignore b/.gitignore
index 37b62a9fa..6a6eb8f57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@ Makefile
Makefile.in
# ...
+_*
.deps/
.libs/
*.o
diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index 94a9f5a71..f7886920c 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -66,6 +66,7 @@ libvmod_XXX_la_CFLAGS = \\
\t at SAN_CFLAGS@
libvmod_XXX_la_LDFLAGS = \\
+\t-export-symbols-regex 'Vmod_XXX_Data' \\
\t$(AM_LDFLAGS) \\
\t$(VMOD_LDFLAGS) \\
\t at SAN_LDFLAGS@
diff --git a/lib/libvmod_blob/automake_boilerplate.am b/lib/libvmod_blob/automake_boilerplate.am
index e9346968e..5bad5e10a 100644
--- a/lib/libvmod_blob/automake_boilerplate.am
+++ b/lib/libvmod_blob/automake_boilerplate.am
@@ -18,6 +18,7 @@ libvmod_blob_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_blob_la_LDFLAGS = \
+ -export-symbols-regex 'Vmod_blob_Data' \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
diff --git a/lib/libvmod_debug/Makefile.am b/lib/libvmod_debug/Makefile.am
index edb074cce..4823e1b4d 100644
--- a/lib/libvmod_debug/Makefile.am
+++ b/lib/libvmod_debug/Makefile.am
@@ -5,42 +5,10 @@ libvmod_debug_la_SOURCES = \
vmod_debug_obj.c \
vmod_debug_dyn.c
-# Boilerplate, do not change
+include $(srcdir)/automake_boilerplate.am
-AM_LDFLAGS = $(AM_LT_LDFLAGS)
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/bin/varnishd \
- -I$(top_builddir)/include
-
-vmoddir = $(pkglibdir)/vmods
-vmod_srcdir = $(top_srcdir)/lib/libvmod_debug
-vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
-vmodtoolargs =
-
-
-noinst_LTLIBRARIES = libvmod_debug.la
-
-libvmod_debug_la_CFLAGS = \
- @SAN_CFLAGS@
-
-libvmod_debug_la_LDFLAGS = \
- $(AM_LDFLAGS) \
- $(VMOD_LDFLAGS) \
- -rpath /nowhere
- @SAN_LDFLAGS@
-
-nodist_libvmod_debug_la_SOURCES = \
- vcc_if.c \
- vcc_if.h
-
-$(libvmod_debug_la_OBJECTS): vcc_if.h
-
-vcc_if.h vmod_debug.rst vmod_debug.man.rst: vcc_if.c
-
-vcc_if.c: $(vmodtool) $(vmod_srcdir)/vmod.vcc
- @PYTHON@ $(vmodtool) $(vmodtoolargs) $(vmod_srcdir)/vmod.vcc
+# not --strict
+vmodtoolargs = --boilerplate
.vsc.c:
$(PYTHON) $(top_srcdir)/lib/libvcc/vsctool.py -ch $<
@@ -49,14 +17,7 @@ VSC_SRC = VSC_debug.vsc
VSC_GEN_C = VSC_debug.c
VSC_GEN_H = VSC_debug.h
+CLEANFILES += $(VSC_GEN_C) $(VSC_GEN_H)
+
BUILT_SOURCES = $(VSC_GEN_C)
libvmod_debug_la_SOURCES += $(VSC_SRC)
-
-$(VSC_GEN_C): $(top_srcdir)/lib/libvcc/vsctool.py
-
-EXTRA_DIST = vmod.vcc
-
-CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
- $(builddir)/vmod_debug.rst \
- $(builddir)/vmod_debug.man.rst \
- $(VSC_GEN_C) $(VSC_GEN_H)
diff --git a/lib/libvmod_debug/automake_boilerplate.am b/lib/libvmod_debug/automake_boilerplate.am
new file mode 100644
index 000000000..fd3aaea3a
--- /dev/null
+++ b/lib/libvmod_debug/automake_boilerplate.am
@@ -0,0 +1,40 @@
+
+# Boilerplate generated by vmodtool.py - changes will be overwritten
+
+AM_LDFLAGS = $(AM_LT_LDFLAGS)
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/bin/varnishd \
+ -I$(top_builddir)/include
+
+vmoddir = $(pkglibdir)/vmods
+vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
+vmodtoolargs = --strict --boilerplate
+
+vmod_LTLIBRARIES = libvmod_debug.la
+
+libvmod_debug_la_CFLAGS = \
+ @SAN_CFLAGS@
+
+libvmod_debug_la_LDFLAGS = \
+ -export-symbols-regex 'Vmod_debug_Data' \
+ $(AM_LDFLAGS) \
+ $(VMOD_LDFLAGS) \
+ @SAN_LDFLAGS@
+
+nodist_libvmod_debug_la_SOURCES = vcc_if.c vcc_if.h
+
+$(libvmod_debug_la_OBJECTS): vcc_if.h
+
+vcc_if.h vmod_debug.rst vmod_debug.man.rst: vcc_if.c
+
+vcc_if.c: $(vmodtool) $(srcdir)/vmod.vcc
+ @PYTHON@ $(vmodtool) $(vmodtoolargs) $(srcdir)/vmod.vcc
+
+EXTRA_DIST = vmod.vcc automake_boilerplate.am
+
+CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
+ $(builddir)/vmod_debug.rst \
+ $(builddir)/vmod_debug.man.rst
+
diff --git a/lib/libvmod_directors/automake_boilerplate.am b/lib/libvmod_directors/automake_boilerplate.am
index df54f452c..2c0b9b5b9 100644
--- a/lib/libvmod_directors/automake_boilerplate.am
+++ b/lib/libvmod_directors/automake_boilerplate.am
@@ -18,6 +18,7 @@ libvmod_directors_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_directors_la_LDFLAGS = \
+ -export-symbols-regex 'Vmod_directors_Data' \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
diff --git a/lib/libvmod_proxy/automake_boilerplate.am b/lib/libvmod_proxy/automake_boilerplate.am
index 64f3c5a0a..4ee1e5abd 100644
--- a/lib/libvmod_proxy/automake_boilerplate.am
+++ b/lib/libvmod_proxy/automake_boilerplate.am
@@ -18,6 +18,7 @@ libvmod_proxy_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_proxy_la_LDFLAGS = \
+ -export-symbols-regex 'Vmod_proxy_Data' \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
diff --git a/lib/libvmod_purge/automake_boilerplate.am b/lib/libvmod_purge/automake_boilerplate.am
index b400cdb3c..d107999e3 100644
--- a/lib/libvmod_purge/automake_boilerplate.am
+++ b/lib/libvmod_purge/automake_boilerplate.am
@@ -18,6 +18,7 @@ libvmod_purge_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_purge_la_LDFLAGS = \
+ -export-symbols-regex 'Vmod_purge_Data' \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
diff --git a/lib/libvmod_std/automake_boilerplate.am b/lib/libvmod_std/automake_boilerplate.am
index c1d6e3d42..e744db0c6 100644
--- a/lib/libvmod_std/automake_boilerplate.am
+++ b/lib/libvmod_std/automake_boilerplate.am
@@ -18,6 +18,7 @@ libvmod_std_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_std_la_LDFLAGS = \
+ -export-symbols-regex 'Vmod_std_Data' \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
diff --git a/lib/libvmod_unix/automake_boilerplate.am b/lib/libvmod_unix/automake_boilerplate.am
index b71674a0e..18d06b8cd 100644
--- a/lib/libvmod_unix/automake_boilerplate.am
+++ b/lib/libvmod_unix/automake_boilerplate.am
@@ -18,6 +18,7 @@ libvmod_unix_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_unix_la_LDFLAGS = \
+ -export-symbols-regex 'Vmod_unix_Data' \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
diff --git a/lib/libvmod_vtc/automake_boilerplate.am b/lib/libvmod_vtc/automake_boilerplate.am
index d7bd77ea1..063ab92ba 100644
--- a/lib/libvmod_vtc/automake_boilerplate.am
+++ b/lib/libvmod_vtc/automake_boilerplate.am
@@ -18,6 +18,7 @@ libvmod_vtc_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_vtc_la_LDFLAGS = \
+ -export-symbols-regex 'Vmod_vtc_Data' \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
More information about the varnish-commit
mailing list