Restrict exported symbols of Bluetooth daemon

This commit is contained in:
Marcel Holtmann 2009-08-28 23:08:34 -07:00
parent c26bb9e6c0
commit 7b6d0c0512
2 changed files with 16 additions and 3 deletions

4
.gitignore vendored
View File

@ -32,8 +32,10 @@ parser.c
bluez.pc
lib/bluetooth
src/bluetoothd
src/builtin.h
src/bluetoothd
src/bluetooth.exp
src/bluetooth.ver
audio/telephony.c
scripts/bluetooth.rules

View File

@ -192,13 +192,15 @@ src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \
src/dbus-common.c src/dbus-common.h \
src/dbus-hci.h src/dbus-hci.c
src_bluetoothd_LDADD = lib/libbluetooth.la @GLIB_LIBS@ @DBUS_LIBS@ -ldl
src_bluetoothd_LDFLAGS = -Wl,--export-dynamic
src_bluetoothd_LDFLAGS = -Wl,--export-dynamic \
-Wl,--version-script=src/bluetooth.ver
src_bluetoothd_DEPENDENCIES = src/bluetooth.ver
builtin_files = src/builtin.h $(builtin_nodist)
nodist_src_bluetoothd_SOURCES = $(builtin_files)
CLEANFILES += $(builtin_files)
CLEANFILES += src/bluetooth.ver src/bluetooth.exp $(builtin_files)
man_MANS = src/bluetoothd.8
@ -326,6 +328,15 @@ src/plugin.$(OBJEXT): src/builtin.h
src/builtin.h: src/genbuiltin $(builtin_sources)
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
src/bluetooth.exp: $(src_bluetoothd_OBJECTS)
$(AM_V_GEN)$(NM) $^ | $(AWK) '{ print $$3 }' | sort -u | \
$(EGREP) -e '^btd_' -e '^g_dbus_' > $@
src/bluetooth.ver: src/bluetooth.exp
$(AM_V_at)echo "{ global:" > $@
$(AM_V_GEN)$(SED) -e "s/\(.*\)/\1;/" $< >> $@
$(AM_V_at)echo "local: *; };" >> $@
audio/telephony.c: audio/@TELEPHONY_DRIVER@
$(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@