From: Sergey Vlasov <vsu@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] libopenobex-1.3 symbol versioning patch
Date: Sun, 13 Aug 2006 18:55:00 +0400
Message-ID: <20060813145500.GB15478@procyon.home> (raw)
In-Reply-To: <20060813122044.GO24054@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]
On Sun, Aug 13, 2006 at 04:20:44PM +0400, Alexey Tourbin wrote:
> Я и говорю: если удалить старый интерфейс полностью, то будет анмет.
Тогда чем это лучше смены soname?
Вообще у меня сейчас получилось вот что:
#define symver_concat(pre, post) pre##post
#define symver_tmp_name(name, line) symver_concat(name##_version_, line)
#define symver_set_weak(real) \
__asm__ (".weak " #real); \
__asm__ (".weak ." #real)
#define symver_define_alias(alias, name) \
extern __typeof__ (name) alias __attribute__((__alias__(#name)))
#define symver_set_version(real, name, version) \
__asm__ (".symver " #real "," #name "@" version); \
__asm__ (".symver ." #real ",." #name "@" version)
#define symver_declare_version(alias, name, version) \
symver_define_alias(alias, name); \
symver_set_version(alias, name, version)
#define symbol_version(name, version) \
symver_declare_version(symver_tmp_name(name, __LINE__), \
name, #version)
#define symbol_default_version(name, version) \
symver_set_weak(name); \
symver_declare_version(symver_tmp_name(name, __LINE__), \
name, "@" #version)
Используется как-то так:
symbol_default_version(junk, JUNK_1.1);
symbol_version(junk, JUNK_1.0);
При этом в map-файле всё равно приходится писать все символы во всех
версиях:
JUNK_1.0 {
global:
junk;
local:
*;
};
JUNK_1.1 {
global:
junk;
} JUNK_1.0;
Использование ".weak" позволяет не менять основной код, где
экспортируемые функции просто определяются как глобальные (без ".weak"
получается конфликт из-за того, что версия с "@@" генерирует
фактически полноценное определение символа). Символы с ".",
предположительно нужные на powerpc64, вроде бы не мешают и на i586.
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
next prev parent reply other threads:[~2006-08-13 14:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-11 18:44 [devel] [RFC] " Sergey Vlasov
2006-08-11 19:42 ` [devel] " Alexey Tourbin
2006-08-12 10:43 ` Sergey Vlasov
2006-08-12 11:19 ` Alexey Tourbin
2006-08-12 13:00 ` Sergey Vlasov
2006-08-12 13:32 ` Alexey Tourbin
2006-08-12 13:46 ` Alexey Tourbin
2006-08-12 14:08 ` Sergey Vlasov
2006-08-15 17:19 ` Dmitry V. Levin
2006-08-12 13:50 ` [devel] [RFC] " Sergey Vlasov
2006-08-12 14:05 ` [devel] " Alexey Tourbin
2006-08-12 14:36 ` Alexey Tourbin
2006-08-12 15:49 ` Sergey Vlasov
2006-08-13 7:51 ` Alexey Tourbin
2006-08-13 12:13 ` Sergey Vlasov
2006-08-13 12:20 ` Alexey Tourbin
2006-08-13 14:55 ` Sergey Vlasov [this message]
2006-08-13 16:00 ` Alexey Tourbin
2006-08-13 18:57 ` Sergey Vlasov
2006-08-15 19:27 ` [devel] [RFC] " Sergey Vlasov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060813145500.GB15478@procyon.home \
--to=vsu@altlinux.ru \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git