[network-manager-applet/th/build-non-recursive-make-bgo778400: 18/18] build: add linker version script to hide symbols in nm-applet/nm-connection-editor
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/th/build-non-recursive-make-bgo778400: 18/18] build: add linker version script to hide symbols in nm-applet/nm-connection-editor
- Date: Thu, 9 Feb 2017 16:13:22 +0000 (UTC)
commit c7d4353a7dd08a7862dbf9d60d77d0a3a71e4f67
Author: Thomas Haller <thaller redhat com>
Date: Thu Feb 9 17:11:01 2017 +0100
build: add linker version script to hide symbols in nm-applet/nm-connection-editor
The binary should not export any symbols unless explicitly white-listed.
This also allows the linker to drop symbols (provided we link with
LTO or --gc-sections).
Makefile.am | 13 +++++++++++++
linker-script-binary.ver | 6 ++++++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 5cac4db..ce6191f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -658,6 +658,12 @@ src_connection_editor_nm_connection_editor_LDADD = \
$(src_connection_editor_nm_connection_editor_OBJECTS): $(connection_editor_h_gen)
+EXTRA_src_connection_editor_nm_connection_editor_DEPENDENCIES = linker-script-binary.ver
+
+src_connection_editor_nm_connection_editor_LDFLAGS =
+ -Wl,--version-script="$(srcdir)/linker-script-binary.ver"
+
+
EXTRA_DIST += \
src/connection-editor/ce-ip4-routes.ui \
src/connection-editor/ce-ip6-routes.ui \
@@ -777,6 +783,12 @@ src_nm_applet_LDADD = \
$(src_nm_applet_OBJECTS): $(nm_applet_h_gen)
+EXTRA_src_nm_applet_DEPENDENCIES = linker-script-binary.ver
+
+src_nm_applet_LDFLAGS =
+ -Wl,--version-script="$(srcdir)/linker-script-binary.ver"
+
+
EXTRA_DIST += \
src/8021x.ui \
src/gsm-unlock.ui \
@@ -812,6 +824,7 @@ check-local: $(check_local)
TESTS += $(check_programs)
EXTRA_DIST += \
+ linker-script-binary.ver \
CONTRIBUTING \
intltool-extract.in \
intltool-merge.in \
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]