]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libhandle: add symbol versioning
authorChristoph Hellwig <hch@lst.de>
Thu, 19 Nov 2009 22:49:59 +0000 (23:49 +0100)
committerhch@lst.de <Christoph Hellwig>
Thu, 19 Nov 2009 22:49:59 +0000 (23:49 +0100)
Add symbol versioning for libhandle.  For now version 1.0.3 contains all
pre-existing symbols, any new additions both needs a minor version bump
and an entry in libhandle.sym.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
libhandle/Makefile
libhandle/libhandle.sym [new file with mode: 0644]

index 369252d5035130ec564229259d9861879f838844..4ce0878016da5994d1b002a72d456c7ee305e050 100644 (file)
@@ -10,7 +10,10 @@ LT_CURRENT = 1
 LT_REVISION = 3
 LT_AGE = 0
 
+LTLDFLAGS += -Wl,--version-script,libhandle.sym
+
 CFILES = handle.c jdm.c
+LSRCFILES = libhandle.sym
 
 default:  $(LTLIBRARY)
 
diff --git a/libhandle/libhandle.sym b/libhandle/libhandle.sym
new file mode 100644 (file)
index 0000000..7541201
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * The symbol versioning ensures that a new application requiring symbol foo()
+ * can't run with old libhandle.so not providing foo() - the global SONAME
+ * version info can't enforce this since we never change the SONAME.
+ *
+ * Older versions of libhandle (<= 1.0.3) do not to use symbol versioning --
+ * all the original symbols are in LIBHANDLE_1.0.3 now.
+ */
+
+LIBHANDLE_1.0.3 {
+global:
+       /* handle.h APIs */
+       path_to_handle;
+       path_to_fshandle;
+       handle_to_fshandle;
+       free_handle;
+       open_by_fshandle;
+       open_by_handle;
+       readlink_by_handle;
+       attr_multi_by_handle;
+       attr_list_by_handle;
+       parents_by_handle;
+       parentpaths_by_handle;
+       fssetdm_by_handle;
+
+       /* jdm.h APIs */
+       jdm_getfshandle;
+       jdm_new_filehandle;
+       jdm_delete_filehandle;
+       jdm_open;
+       jdm_readlink;
+       jdm_attr_multi;
+       jdm_attr_list;
+       jdm_parents;
+       jdm_parentpaths;
+};