From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Sat, 19 Sep 2020 00:02:16 +0200 Subject: [PATCH] libmpathpersist: add linker version script This defines the ABI of libmpathpersist in the current state. The initial version is set to "LIBMPATHPERSIST_1.0.0". Reviewed-by: Benjamin Marzinski Signed-off-by: Benjamin Marzinski --- libmpathpersist/Makefile | 6 +++-- libmpathpersist/libmpathpersist.version | 32 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 libmpathpersist/libmpathpersist.version diff --git a/libmpathpersist/Makefile b/libmpathpersist/Makefile index 9e869fdc..456ce4cf 100644 --- a/libmpathpersist/Makefile +++ b/libmpathpersist/Makefile @@ -3,6 +3,7 @@ include ../Makefile.inc SONAME = 0 DEVLIB = libmpathpersist.so LIBS = $(DEVLIB).$(SONAME) +VERSION_SCRIPT := libmpathpersist.version CFLAGS += $(LIB_CFLAGS) -I$(multipathdir) -I$(mpathpersistdir) -I$(mpathcmddir) @@ -13,8 +14,9 @@ OBJS = mpath_persist.o mpath_updatepr.o mpath_pr_ioctl.o all: $(DEVLIB) man -$(LIBS): $(OBJS) - $(CC) $(LDFLAGS) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ -o $@ $(OBJS) +$(LIBS): $(OBJS) $(VERSION_SCRIPT) + $(CC) $(LDFLAGS) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ \ + -Wl,--version-script=$(VERSION_SCRIPT) -o $@ $(OBJS) $(DEVLIB): $(LIBS) $(LN) $(LIBS) $@ diff --git a/libmpathpersist/libmpathpersist.version b/libmpathpersist/libmpathpersist.version new file mode 100644 index 00000000..dc648ce6 --- /dev/null +++ b/libmpathpersist/libmpathpersist.version @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2020 SUSE LLC + * SPDX-License-Identifier: GPL-2.0-or-later + * + * libmpathpersist ABI + * + * The ABI of libmpathpersist 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. + */ +LIBMPATHPERSIST_1.0.0 { +global: + + __mpath_persistent_reserve_in; + __mpath_persistent_reserve_out; + dumpHex; + mpath_alloc_prin_response; + mpath_lib_exit; + mpath_lib_init; + mpath_mx_alloc_len; + mpath_persistent_reserve_in; + mpath_persistent_reserve_init_vecs; + mpath_persistent_reserve_out; + mpath_persistent_reserve_free_vecs; + prin_do_scsi_ioctl; + prout_do_scsi_ioctl; + update_map_pr; + +local: *; +}; -- 2.17.2