* [PATCH] libhandle: add symbol versioning
@ 2009-10-30 13:12 Christoph Hellwig
2009-11-19 4:34 ` Eric Sandeen
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2009-10-30 13:12 UTC (permalink / raw)
To: xfs
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>
Index: xfsprogs-dev/libhandle/Makefile
===================================================================
--- xfsprogs-dev.orig/libhandle/Makefile 2009-10-30 13:00:51.000000000 +0000
+++ xfsprogs-dev/libhandle/Makefile 2009-10-30 13:09:43.000000000 +0000
@@ -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)
Index: xfsprogs-dev/libhandle/libhandle.sym
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ xfsprogs-dev/libhandle/libhandle.sym 2009-10-30 13:00:45.000000000 +0000
@@ -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;
+};
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] libhandle: add symbol versioning
2009-10-30 13:12 [PATCH] libhandle: add symbol versioning Christoph Hellwig
@ 2009-11-19 4:34 ` Eric Sandeen
0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2009-11-19 4:34 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
> 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>
I don't claim to be a libtool expert, but as far as I can tell,
this seems ok to me.
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
> Index: xfsprogs-dev/libhandle/Makefile
> ===================================================================
> --- xfsprogs-dev.orig/libhandle/Makefile 2009-10-30 13:00:51.000000000 +0000
> +++ xfsprogs-dev/libhandle/Makefile 2009-10-30 13:09:43.000000000 +0000
> @@ -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)
>
> Index: xfsprogs-dev/libhandle/libhandle.sym
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ xfsprogs-dev/libhandle/libhandle.sym 2009-10-30 13:00:45.000000000 +0000
> @@ -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;
> +};
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-19 4:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-30 13:12 [PATCH] libhandle: add symbol versioning Christoph Hellwig
2009-11-19 4:34 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox