[Zlib-devel] I: [PATCH] introduce ELF versioning for libz.so.1
Dmitry V. Levin
ldv at altlinux.org
Fri Dec 2 07:20:42 EST 2005
Hi,
Since almost every new zlib release introduces new functions,
I suggest to introduce and support versioning in libz.so.1 for better
backwards compatibility.
As a zlib package maintainer in Owl and ALT Linux distributions,
I support ELF versioning for libz.so.1 since zlib-1.2.1.1.
Poposed patch for GNU/Linux is attached.
All symbols from zlib-1.1.4 remain unversioned, the patch adds versioning
only for symbols introduced in zlib-1.2.0 or later. It also declares as
local those symbols which are not designed to be exported.
--
ldv
-------------- next part --------------
diff -upk.orig zlib-1.2.3.orig/configure zlib-1.2.3/configure
--- zlib-1.2.3.orig/configure 2005-07-11 20:11:57 +0000
+++ zlib-1.2.3/configure 2004-09-23 11:44:43 +0000
@@ -76,7 +76,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags
SFLAGS=${CFLAGS-"-fPIC -O3"}
CFLAGS="$cflags"
case `(uname -s || echo unknown) 2>/dev/null` in
- Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
+ Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"};;
CYGWIN* | Cygwin* | cygwin* | OS/2* )
EXE='.exe';;
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
diff -upk.orig zlib-1.2.3.orig/zlib.map zlib-1.2.3/zlib.map
--- zlib-1.2.3.orig/zlib.map 1970-01-01 00:00:00 +0000
+++ zlib-1.2.3/zlib.map 2005-08-20 13:11:28 +0000
@@ -0,0 +1,44 @@
+ZLIB_1.2.0 {
+ global:
+ compressBound;
+ deflateBound;
+ inflateBack;
+ inflateBackEnd;
+ inflateBackInit_;
+ inflateCopy;
+ local:
+ deflate_copyright;
+ inflate_copyright;
+ inflate_fast;
+ inflate_table;
+ zcalloc;
+ zcfree;
+ z_errmsg;
+ _*;
+};
+
+ZLIB_1.2.0.2 {
+ gzclearerr;
+ gzungetc;
+ zlibCompileFlags;
+} ZLIB_1.2.0;
+
+ZLIB_1.2.0.8 {
+ deflatePrime;
+} ZLIB_1.2.0.2;
+
+ZLIB_1.2.2 {
+ adler32_combine;
+ crc32_combine;
+ deflateSetHeader;
+ inflateGetHeader;
+} ZLIB_1.2.0.8;
+
+ZLIB_1.2.2.3 {
+ deflateTune;
+ gzdirect;
+} ZLIB_1.2.2;
+
+ZLIB_1.2.2.4 {
+ inflatePrime;
+} ZLIB_1.2.2.3;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://madler.net/pipermail/zlib-devel_madler.net/attachments/20051202/04bb330e/attachment.sig>
More information about the Zlib-devel
mailing list