[PATCH 1/5] build: add individual linker version scripts for shared libraries
Thomas Haller
thaller at redhat.com
Sun Jan 4 08:24:36 PST 2015
Instead of using a shared version script 'libnl.sym', add individual
linker scripts for all libnl libraries.
For now, the content of the version script is unchanged and this
patch does not have any externally visible changes.
Signed-off-by: Thomas Haller <thaller at redhat.com>
---
.gitignore | 1 -
Makefile.am | 8 +++++++-
configure.ac | 1 -
lib/Makefile.am | 33 +++++++++++++++++++++++++++++++--
libnl-3.sym | 9 +++++++++
libnl-genl-3.sym | 4 ++++
libnl-idiag-3.sym | 4 ++++
libnl-nf-3.sym | 4 ++++
libnl-route-3.sym | 4 ++++
libnl-xfrm-3.sym | 4 ++++
libnl.sym.in | 9 ---------
11 files changed, 67 insertions(+), 14 deletions(-)
create mode 100644 libnl-3.sym
create mode 100644 libnl-genl-3.sym
create mode 100644 libnl-idiag-3.sym
create mode 100644 libnl-nf-3.sym
create mode 100644 libnl-route-3.sym
create mode 100644 libnl-xfrm-3.sym
delete mode 100644 libnl.sym.in
diff --git a/.gitignore b/.gitignore
index 5f5f1cc..ad0cbc2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,4 +24,3 @@ cscope.*
/configure
/libtool
/*.pc
-/libnl.sym
diff --git a/Makefile.am b/Makefile.am
index 6d047a9..e48f1f8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,4 +21,10 @@ pkgsysconfdir = ${sysconfdir}/libnl
pkgsysconf_DATA = etc/pktloc etc/classid
EXTRA_DIST = \
- $(pkgsysconf_DATA)
+ $(pkgsysconf_DATA) \
+ libnl-3.sym \
+ libnl-genl-3.sym \
+ libnl-idiag-3.sym \
+ libnl-nf-3.sym \
+ libnl-route-3.sym \
+ libnl-xfrm-3.sym
diff --git a/configure.ac b/configure.ac
index 9c59c05..097dca8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,6 @@ AC_CONFIG_SUBDIRS([doc])
AC_CONFIG_FILES([
Makefile
-libnl.sym
libnl-3.0.pc
libnl-route-3.0.pc
libnl-genl-3.0.pc
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f7e5a93..f193c29 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -11,27 +11,46 @@ AM_CPPFLAGS = \
-DSYSCONFDIR=\"$(sysconfdir)/libnl\"
AM_LDFLAGS = \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
- -Wl,--version-script=$(top_builddir)/libnl.sym
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
lib_LTLIBRARIES = \
libnl-3.la libnl-genl-3.la libnl-route-3.la libnl-nf-3.la libnl-idiag-3.la libnl-xfrm-3.la
+libnl_3_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -Wl,--version-script=$(top_builddir)/libnl-3.sym
+libnl_3_la_DEPENDENCIES = \
+ $(top_builddir)/libnl-3.sym
libnl_3_la_SOURCES = \
addr.c attr.c cache.c cache_mngr.c cache_mngt.c data.c \
error.c handlers.c msg.c nl.c object.c socket.c utils.c \
version.c hash.c hashtable.c
libnl_idiag_3_la_LIBADD = libnl-3.la
+libnl_idiag_3_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -Wl,--version-script=$(top_builddir)/libnl-idiag-3.sym
+libnl_idiag_3_la_DEPENDENCIES = \
+ $(top_builddir)/libnl-idiag-3.sym
libnl_idiag_3_la_SOURCES = \
idiag/idiag_meminfo_obj.c idiag/idiag_vegasinfo_obj.c \
idiag/idiag_msg_obj.c idiag/idiag_req_obj.c idiag/idiag.c
libnl_genl_3_la_LIBADD = libnl-3.la
+libnl_genl_3_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -Wl,--version-script=$(top_builddir)/libnl-genl-3.sym
+libnl_genl_3_la_DEPENDENCIES = \
+ $(top_builddir)/libnl-genl-3.sym
libnl_genl_3_la_SOURCES = \
genl/ctrl.c genl/family.c genl/genl.c genl/mngt.c
libnl_nf_3_la_LIBADD = libnl-route-3.la
+libnl_nf_3_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -Wl,--version-script=$(top_builddir)/libnl-nf-3.sym
+libnl_nf_3_la_DEPENDENCIES = \
+ $(top_builddir)/libnl-nf-3.sym
libnl_nf_3_la_SOURCES = \
netfilter/ct.c netfilter/ct_obj.c netfilter/log.c \
netfilter/log_msg.c netfilter/log_msg_obj.c netfilter/log_obj.c \
@@ -60,6 +79,11 @@ route/cls/ematch_syntax.c: route/cls/ematch_syntax.y
$(AM_V_GEN) $(MKDIR_P) route/cls; $(YACC) -d $(YFLAGS) -o $@ $^
libnl_route_3_la_LIBADD = libnl-3.la
+libnl_route_3_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -Wl,--version-script=$(top_builddir)/libnl-route-3.sym
+libnl_route_3_la_DEPENDENCIES = \
+ $(top_builddir)/libnl-route-3.sym
libnl_route_3_la_SOURCES = \
route/addr.c route/class.c route/cls.c route/act.c route/link.c \
route/neigh.c route/neightbl.c route/nexthop.c route/qdisc.c \
@@ -112,6 +136,11 @@ EXTRA_DIST = \
route/cls/ematch_syntax.y
libnl_xfrm_3_la_LIBADD = libnl-3.la
+libnl_xfrm_3_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -Wl,--version-script=$(top_builddir)/libnl-xfrm-3.sym
+libnl_xfrm_3_la_DEPENDENCIES = \
+ $(top_builddir)/libnl-xfrm-3.sym
libnl_xfrm_3_la_SOURCES = \
xfrm/ae.c \
xfrm/lifetime.c \
diff --git a/libnl-3.sym b/libnl-3.sym
new file mode 100644
index 0000000..b1d72ff
--- /dev/null
+++ b/libnl-3.sym
@@ -0,0 +1,9 @@
+libnl_3 {
+global:
+ *;
+local:
+ _nl_socket_generate_local_port_no_release;
+ _nl_socket_is_local_port_unspecified;
+ _nl_socket_used_ports_release_all;
+ _nl_socket_used_ports_set;
+};
diff --git a/libnl-genl-3.sym b/libnl-genl-3.sym
new file mode 100644
index 0000000..3532579
--- /dev/null
+++ b/libnl-genl-3.sym
@@ -0,0 +1,4 @@
+libnl_3 {
+global:
+ *;
+};
diff --git a/libnl-idiag-3.sym b/libnl-idiag-3.sym
new file mode 100644
index 0000000..3532579
--- /dev/null
+++ b/libnl-idiag-3.sym
@@ -0,0 +1,4 @@
+libnl_3 {
+global:
+ *;
+};
diff --git a/libnl-nf-3.sym b/libnl-nf-3.sym
new file mode 100644
index 0000000..3532579
--- /dev/null
+++ b/libnl-nf-3.sym
@@ -0,0 +1,4 @@
+libnl_3 {
+global:
+ *;
+};
diff --git a/libnl-route-3.sym b/libnl-route-3.sym
new file mode 100644
index 0000000..3532579
--- /dev/null
+++ b/libnl-route-3.sym
@@ -0,0 +1,4 @@
+libnl_3 {
+global:
+ *;
+};
diff --git a/libnl-xfrm-3.sym b/libnl-xfrm-3.sym
new file mode 100644
index 0000000..3532579
--- /dev/null
+++ b/libnl-xfrm-3.sym
@@ -0,0 +1,4 @@
+libnl_3 {
+global:
+ *;
+};
diff --git a/libnl.sym.in b/libnl.sym.in
deleted file mode 100644
index df8888c..0000000
--- a/libnl.sym.in
+++ /dev/null
@@ -1,9 +0,0 @@
-libnl_ at MAJ_VERSION@ {
-global:
- *;
-local:
- _nl_socket_generate_local_port_no_release;
- _nl_socket_is_local_port_unspecified;
- _nl_socket_used_ports_release_all;
- _nl_socket_used_ports_set;
-};
--
1.9.3
More information about the libnl
mailing list