summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-05-02 11:14:23 -0500
committerDan Williams <dcbw@redhat.com>2014-05-13 13:50:25 -0500
commit429d492ccfbb22bfb30e98b2c37cb37c9e02c408 (patch)
treebb4203a490a5c4491af3f4274ffc10be28eb18ee
parent4a58ff0807e9d6b5dd6f465ffd4566d18a563c13 (diff)
downloadNetworkManager-429d492ccfbb22bfb30e98b2c37cb37c9e02c408.tar.gz
bluez: implement plugin symbol visibility
The only public symbols should be the factory functions.
-rw-r--r--src/devices/bluetooth/Makefile.am15
-rw-r--r--src/devices/bluetooth/exports.ver7
2 files changed, 21 insertions, 1 deletions
diff --git a/src/devices/bluetooth/Makefile.am b/src/devices/bluetooth/Makefile.am
index 22777beeec..639a1ad7a2 100644
--- a/src/devices/bluetooth/Makefile.am
+++ b/src/devices/bluetooth/Makefile.am
@@ -33,6 +33,8 @@ BUILT_SOURCES = $(GLIB_GENERATED) nm-device-bt-glue.h
pkglib_LTLIBRARIES = libnm-device-plugin-bluetooth.la
+SYMBOL_VIS_FILE=$(srcdir)/exports.ver
+
libnm_device_plugin_bluetooth_la_SOURCES = \
nm-bluez-manager.c \
nm-bluez-manager.h \
@@ -51,11 +53,22 @@ libnm_device_plugin_bluetooth_la_SOURCES = \
\
$(BUILT_SOURCES)
-libnm_device_plugin_bluetooth_la_LDFLAGS = -module -avoid-version
+libnm_device_plugin_bluetooth_la_LDFLAGS = \
+ -module -avoid-version \
+ -Wl,--version-script=$(SYMBOL_VIS_FILE)
+
libnm_device_plugin_bluetooth_la_LIBADD = \
$(top_builddir)/src/devices/wwan/libnm-wwan.la \
$(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-bluetooth.so $(SYMBOL_VIS_FILE)
+
+endif
diff --git a/src/devices/bluetooth/exports.ver b/src/devices/bluetooth/exports.ver
new file mode 100644
index 0000000000..d2c451244b
--- /dev/null
+++ b/src/devices/bluetooth/exports.ver
@@ -0,0 +1,7 @@
+{
+global:
+ nm_device_factory_create;
+ nm_device_factory_get_device_type;
+local:
+ *;
+};