From 84c60a1f2d1f39494077c2a4cd602d2a5728727f Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 2 May 2014 11:15:53 -0500 Subject: [PATCH] adsl: implement plugin symbol visibility The only public symbols should be the factory functions. --- src/devices/adsl/Makefile.am | 15 ++++++++++++++- src/devices/adsl/exports.ver | 7 +++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/devices/adsl/exports.ver diff --git a/src/devices/adsl/Makefile.am b/src/devices/adsl/Makefile.am index a4ec50abf8..0430f47d02 100644 --- a/src/devices/adsl/Makefile.am +++ b/src/devices/adsl/Makefile.am @@ -33,6 +33,8 @@ BUILT_SOURCES = $(GLIB_GENERATED) nm-device-adsl-glue.h pkglib_LTLIBRARIES = libnm-device-plugin-adsl.la +SYMBOL_VIS_FILE=$(srcdir)/exports.ver + libnm_device_plugin_adsl_la_SOURCES = \ nm-atm-manager.c \ nm-atm-manager.h \ @@ -41,10 +43,21 @@ libnm_device_plugin_adsl_la_SOURCES = \ \ $(BUILT_SOURCES) -libnm_device_plugin_adsl_la_LDFLAGS = -module -avoid-version +libnm_device_plugin_adsl_la_LDFLAGS = \ + -module -avoid-version \ + -Wl,--version-script=$(SYMBOL_VIS_FILE) + libnm_device_plugin_adsl_la_LIBADD = \ $(DBUS_LIBS) \ $(GUDEV_LIBS) CLEANFILES = $(BUILT_SOURCES) +EXTRA_DIST = $(SYMBOL_VIS_FILE) + +if ENABLE_TESTS + +check-local: + $(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-device-plugin-adsl.so $(SYMBOL_VIS_FILE) + +endif diff --git a/src/devices/adsl/exports.ver b/src/devices/adsl/exports.ver new file mode 100644 index 0000000000..d2c451244b --- /dev/null +++ b/src/devices/adsl/exports.ver @@ -0,0 +1,7 @@ +{ +global: + nm_device_factory_create; + nm_device_factory_get_device_type; +local: + *; +};