diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-19 21:39:16 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-19 21:39:16 +0100 |
commit | afcd7091a075bb2a6032578a4d6414ae4135aeb5 (patch) | |
tree | 512a50e9bfca352c4294eb2e5b017db857598bd0 /libmysql/libmysql_versions.ld.in | |
parent | b1966435c2612e4fd9c9c1424d387a5a72d8ddb0 (diff) | |
download | mariadb-git-afcd7091a075bb2a6032578a4d6414ae4135aeb5.tar.gz |
MDEV-5529 Sync libmysqlclient.so symbol versioning across distributions
An attempt to introduce libmysqlclient.so symbol versioning that is
compatible both with Debian and Fedora all versions: put all symbols into
libmysqlclient_18 version node (as on Debian), but also put aliases of
old symbols into libmysqlclient_16 version node (as on Fedora).
Also use a linker script to create aliases of exported symbols, not
rpm_support.cc source file.
Diffstat (limited to 'libmysql/libmysql_versions.ld.in')
-rw-r--r-- | libmysql/libmysql_versions.ld.in | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/libmysql/libmysql_versions.ld.in b/libmysql/libmysql_versions.ld.in new file mode 100644 index 00000000000..8d97da5b2eb --- /dev/null +++ b/libmysql/libmysql_versions.ld.in @@ -0,0 +1,45 @@ +/* + This version script is heavily inspired by Fedora's and Mageia's version + scripts for MySQL client shared library. + But it was modified to support Debian-compatible versioning too. + + In RedHat universe, symbols from old libmysqlclient.so.16 + keep their libmysqlclient_16 version. New symbols added in + libmysqlclient.so.18 get the new libmysqlclient_18 version. + + In Debian all symbols in libmysqlclient.so.18 have libmysqlclient_18 version, + including symbols that existed in libmysqlclient.so.16 + + We solve this by putting all symbols into libmysqlclient_18 version node, + but creating aliases for old symbols in the libmysqlclient_16 version node. +*/ + +@CLIENT_API_5_1_ALIASES@ + +/* + On Fedora the following symbols are exported, but renamed into a mysql_ + namespace. We export them as aliases, but keep original symbols too. See + MDEV-4127. +*/ +mysql_default_charset_info = default_charset_info; +mysql_get_charset = get_charset; +mysql_get_charset_by_csname = get_charset_by_csname; +mysql_net_realloc = net_realloc; +mysql_client_errors = client_errors; + +VERSION { + +libmysqlclient_18 { + global: +@CLIENT_API_5_1_LIST@ +@CLIENT_API_5_5_LIST@ + + local: + *; +}; + +libmysqlclient_16 { + /* empty here. aliases are added above */ +}; + +} |