diff options
author | Thomas Haller <thaller@redhat.com> | 2017-02-09 17:11:01 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-02-09 17:15:51 +0100 |
commit | 187c953d9db26d66eb912b144996586961e0cb22 (patch) | |
tree | d055afad62270187010832e0bc3846294ce3b428 | |
parent | d8e4aa22868b17425753b260a17c8edb43b6dc8e (diff) | |
download | network-manager-applet-th/build-non-recursive-make-bgo778400.tar.gz |
build: add linker version script to hide symbols in nm-applet/nm-connection-editorth/build-non-recursive-make-bgo778400
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).
-rw-r--r-- | Makefile.am | 13 | ||||
-rw-r--r-- | linker-script-binary.ver | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 5cac4db9..25e2469f 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 00000000..a2780c09 --- /dev/null +++ b/linker-script-binary.ver @@ -0,0 +1,6 @@ +{ +global: + _IO_stdin_used; +local: + *; +}; |