[network-manager-openvpn: 11/14] build: add linker version script for executables
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn: 11/14] build: add linker version script for executables
- Date: Sun, 12 Feb 2017 12:51:44 +0000 (UTC)
commit a0a855e4739011e6fadfa933f08872f8c5f6bbe6
Author: Thomas Haller <thaller redhat com>
Date: Sun Feb 12 12:31:42 2017 +0100
build: add linker version script for executables
It allows --gc-sections to prune unused symbols.
Makefile.am | 13 +++++++++++++
linker-script-binary.ver | 6 ++++++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index fda81d4..49bc04b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,18 +67,26 @@ src_nm_openvpn_service_SOURCES = \
src/nm-openvpn-service.c \
src/nm-openvpn-service.h
src_nm_openvpn_service_CPPFLAGS = $(src_cppflags)
+src_nm_openvpn_service_LDFLAGS = \
+ -Wl,--version-script="$(srcdir)/linker-script-binary.ver"
src_nm_openvpn_service_LDADD = \
src/libnm-utils.la \
$(GLIB_LIBS) \
$(LIBNM_LIBS)
+EXTRA_src_nm_openvpn_service_DEPENDENCIES = \
+ linker-script-binary.ver
libexec_PROGRAMS += src/nm-openvpn-service-openvpn-helper
src_nm_openvpn_service_openvpn_helper_CPPFLAGS = $(src_cppflags)
+src_nm_openvpn_service_openvpn_helper_LDFLAGS = \
+ -Wl,--version-script="$(srcdir)/linker-script-binary.ver"
src_nm_openvpn_service_openvpn_helper_LDADD = \
src/libnm-utils.la \
$(GLIB_LIBS) \
$(LIBNM_LIBS)
+EXTRA_src_nm_openvpn_service_openvpn_helper_DEPENDENCIES = \
+ linker-script-binary.ver
###############################################################################
@@ -316,12 +324,16 @@ auth_dialog_nm_openvpn_auth_dialog_CPPFLAGS = \
$(LIBNM_CFLAGS) \
$(LIBNMA_CFLAGS) \
$(LIBSECRET_CFLAGS)
+auth_dialog_nm_openvpn_auth_dialog_LDFLAGS = \
+ -Wl,--version-script="$(srcdir)/linker-script-binary.ver"
auth_dialog_nm_openvpn_auth_dialog_LDADD = \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(LIBNM_LIBS) \
$(LIBNMA_LIBS) \
$(LIBSECRET_LIBS)
+EXTRA_auth_dialog_nm_openvpn_auth_dialog_DEPENDENCIES = \
+ linker-script-binary.ver
###############################################################################
@@ -359,6 +371,7 @@ noinst_PROGRAMS += $(check_programs)
TESTS = $(check_programs)
EXTRA_DIST += \
+ linker-script-binary.ver \
nm-openvpn-service.name.in \
$(dbusservice_DATA) \
$(appdata_in_files) \
diff --git a/linker-script-binary.ver b/linker-script-binary.ver
new file mode 100644
index 0000000..a2780c0
--- /dev/null
+++ b/linker-script-binary.ver
@@ -0,0 +1,6 @@
+{
+global:
+ _IO_stdin_used;
+local:
+ *;
+};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]