diff options
author | Arturo Borrero Gonzalez <arturo@netfilter.org> | 2019-07-01 12:53:28 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-07-01 20:43:46 +0200 |
commit | 16543a0136c00391ecb7e38a13878eb806648bf7 (patch) | |
tree | f70123cc4ead1f697748899c9a1df78acb850f91 /src/Makefile.am | |
parent | f218391fb8d3c9fde3a4897a1188f0aec811dcbe (diff) |
libnftables: export public symbols only
Export public symbols (the library API functions) instead of all symbols in
the library.
This patch introduces the required macros to manage the visibility attributes
(mostly copied from libnftnl.git) and also marks each symbol as exported when
they need to be public. Also, introduce a .map file for proper symbol
versioning.
Previous to this patch, libnftables public symbols were:
% dpkg-gensymbols -q -plibnftables -v0.9.1 -O -esrc/.libs/libnftables.so.1 | wc -l
527
With this patch, libnftables symbols are:
% dpkg-gensymbols -q -plibnftables -v0.9.1 -O -esrc/.libs/libnftables.so.1
libnftables.so.1 libnftables #MINVER#
nft_ctx_add_include_path@Base 0.9.1
nft_ctx_buffer_error@Base 0.9.1
nft_ctx_buffer_output@Base 0.9.1
nft_ctx_clear_include_paths@Base 0.9.1
nft_ctx_free@Base 0.9.1
nft_ctx_get_dry_run@Base 0.9.1
nft_ctx_get_error_buffer@Base 0.9.1
nft_ctx_get_output_buffer@Base 0.9.1
nft_ctx_new@Base 0.9.1
nft_ctx_output_get_debug@Base 0.9.1
nft_ctx_output_get_flags@Base 0.9.1
nft_ctx_output_set_debug@Base 0.9.1
nft_ctx_output_set_flags@Base 0.9.1
nft_ctx_set_dry_run@Base 0.9.1
nft_ctx_set_error@Base 0.9.1
nft_ctx_set_output@Base 0.9.1
nft_ctx_unbuffer_error@Base 0.9.1
nft_ctx_unbuffer_output@Base 0.9.1
nft_run_cmd_from_buffer@Base 0.9.1
nft_run_cmd_from_filename@Base 0.9.1
Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index a1c18fe2..9ad7e1f2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,7 +19,7 @@ AM_CFLAGS = -Wall \ -Wdeclaration-after-statement -Wsign-compare -Winit-self \ -Wformat-nonliteral -Wformat-security -Wmissing-format-attribute \ -Wcast-align -Wundef -Wbad-function-cast \ - -Waggregate-return -Wunused -Wwrite-strings + -Waggregate-return -Wunused -Wwrite-strings ${GCC_FVISIBILITY_HIDDEN} AM_YFLAGS = -d @@ -63,7 +63,8 @@ libnftables_la_SOURCES = \ tcpopt.c \ socket.c \ print.c \ - libnftables.c + libnftables.c \ + libnftables.map # yacc and lex generate dirty code noinst_LTLIBRARIES = libparser.la @@ -77,7 +78,8 @@ libparser_la_CFLAGS = ${AM_CFLAGS} \ -Wno-redundant-decls libnftables_la_LIBADD = ${LIBMNL_LIBS} ${LIBNFTNL_LIBS} libparser.la -libnftables_la_LDFLAGS = -version-info ${libnftables_LIBVERSION} +libnftables_la_LDFLAGS = -version-info ${libnftables_LIBVERSION} \ + --version-script=$(srcdir)/libnftables.map if BUILD_MINIGMP noinst_LTLIBRARIES += libminigmp.la |