From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Tue, 22 Sep 2020 12:54:20 +0200 Subject: [PATCH] libmpathcmd: add linker version script For completeness, this isn't really necessary. The version string is set to "LIBMPATHCMD_1.0.0". Reviewed-by: Benjamin Marzinski Signed-off-by: Benjamin Marzinski --- libmpathcmd/Makefile | 6 ++++-- libmpathcmd/libmpathcmd.version | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 libmpathcmd/libmpathcmd.version diff --git a/libmpathcmd/Makefile b/libmpathcmd/Makefile index 08ccb811..25910194 100644 --- a/libmpathcmd/Makefile +++ b/libmpathcmd/Makefile @@ -3,6 +3,7 @@ include ../Makefile.inc SONAME = 0 DEVLIB = libmpathcmd.so LIBS = $(DEVLIB).$(SONAME) +VERSION_SCRIPT := libmpathcmd.version CFLAGS += $(LIB_CFLAGS) @@ -10,8 +11,9 @@ OBJS = mpath_cmd.o all: $(DEVLIB) -$(LIBS): $(OBJS) - $(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ -o $@ $(OBJS) $(LIBDEPS) +$(LIBS): $(OBJS) $(VERSION_SCRIPT) + $(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ \ + -Wl,--version-script=$(VERSION_SCRIPT) -o $@ $(OBJS) $(LIBDEPS) $(DEVLIB): $(LIBS) $(LN) $(LIBS) $@ diff --git a/libmpathcmd/libmpathcmd.version b/libmpathcmd/libmpathcmd.version new file mode 100644 index 00000000..f1006280 --- /dev/null +++ b/libmpathcmd/libmpathcmd.version @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2020 SUSE LLC + * SPDX-License-Identifier: GPL-2.0-or-later + * + * libmpathcmd ABI + * + * The ABI of libmpathcmd is supposed to remain stable. Removing symbols + * or altering existing symbols' semantics is not allowed. When changing a + * a symbol, either use a new name, or explicit symver directives. + * + * See libmultipath.version for general policy about version numbers. + */ +LIBMPATHCMD_1.0.0 { +global: + __mpath_connect; + mpath_connect; + mpath_disconnect; + mpath_process_cmd; + mpath_recv_reply; + mpath_recv_reply_len; + mpath_recv_reply_data; + mpath_send_cmd; +local: + *; +}; -- 2.17.2