From: Sergey Vlasov <vsu@altlinux.ru> To: ALT Devel discussion list <devel@lists.altlinux.org> Subject: [devel] [RFC] libopenobex-1.3 symbol versioning patch Date: Fri, 11 Aug 2006 22:44:53 +0400 Message-ID: <20060811184453.GD15128@procyon.home> (raw) [-- Attachment #1: Type: text/plain, Size: 5094 bytes --] Hello! Прошу высказать замечания по прилагаемому патчу, который добавляет symbol versioning в libopenobex-1.3 (сейчас в Сизифе лежит 1.0.1). Глубже версии 1.0.0 я копать не стал (это конец 2002 года, 1.0.1, где не сделали ничего существенного - октябрь 2003). На то, что было в этих версиях, я поставил версию OPENOBEX_1.0 (можно было, конечно, написать 1.0.0, но позднее формат версий немного сменился). Функции OBEX_SetUserCallBack, OBEX_SetTransportMTU, OBEX_ServerAccept, OBEX_ObjectReParseHeaders на самом деле были ещё в 1.0.0, но фактически не были доступны из-за фильтрации символов по lib/obex.sym, где они были пропущены (эта ошибка была исправлена уже после выхода 1.0.1, и первый релиз, в который попало исправление - 1.1), поэтому я поставил для этих символов версию OPENOBEX_1.1, как и для добавленных позднее в ходе разработки 1.1 OBEX_SuspendRequest, OBEX_ResumeRequest, OBEX_InterfaceConnect, OBEX_FindInterfaces, OBEX_FreeInterfaces. После 1.1 вроде бы изменений ABI больше не было (во всяком случае, файл lib/obex.sym больше не менялся). Тест для autoconf самопальный - возможно, у кого-то есть варианты лучше? --- openobex-1.3/lib/Makefile.am.alt-symbol-versions 2006-08-11 16:38:36 +0400 +++ openobex-1.3/lib/Makefile.am 2006-08-11 22:05:23 +0400 @@ -17,14 +17,20 @@ libopenobex_la_SOURCES = \ irda.h irda_wrap.h \ usbobex.c usbobex.h +if VERSIONED_SYMBOLS +VSYMS = -Wl,--version-script=$(srcdir)/obex.ver +else +VSYMS = -export-symbols $(srcdir)/obex.sym +endif + libopenobex_la_LDFLAGS = \ -version-info 4:0:3 \ - -export-symbols $(top_srcdir)/lib/obex.sym + $(VSYMS) libopenobex_la_LIBADD = @USB_LIBS@ INCLUDES = -I$(top_builddir)/include -EXTRA_DIST = obex.sym win32compat.c +EXTRA_DIST = obex.ver obex.sym win32compat.c MAINTAINERCLEANFILES = Makefile.in --- openobex-1.3/lib/obex.ver.alt-symbol-versions 2006-08-11 22:05:23 +0400 +++ openobex-1.3/lib/obex.ver 2006-08-11 22:05:23 +0400 @@ -0,0 +1,57 @@ +OPENOBEX_1.0 { +global: + + OBEX_Init; + OBEX_Cleanup; + OBEX_RegisterCTransport; + OBEX_SetCustomData; + OBEX_GetCustomData; + OBEX_TransportConnect; + OBEX_TransportDisconnect; + OBEX_CustomDataFeed; + OBEX_GetFD; + OBEX_HandleInput; + OBEX_ServerRegister; + OBEX_Request; + OBEX_CancelRequest; + OBEX_SetUserData; + OBEX_GetUserData; + OBEX_ObjectNew; + OBEX_ObjectDelete; + OBEX_ObjectAddHeader; + OBEX_ObjectGetNextHeader; + OBEX_ObjectReadStream; + OBEX_ObjectSetRsp; + OBEX_ObjectGetNonHdrData; + OBEX_ObjectSetNonHdrData; + OBEX_ObjectSetHdrOffset; + OBEX_UnicodeToChar; + OBEX_CharToUnicode; + OBEX_ResponseToString; + OBEX_GetResponseMessage; + InOBEX_ServerRegister; + InOBEX_TransportConnect; + IrOBEX_ServerRegister; + IrOBEX_TransportConnect; + BtOBEX_ServerRegister; + BtOBEX_TransportConnect; + FdOBEX_TransportSetup; + +local: + *; +}; + +OPENOBEX_1.1 { +global: + + OBEX_FindInterfaces; + OBEX_FreeInterfaces; + OBEX_InterfaceConnect; + OBEX_ObjectReParseHeaders; + OBEX_ResumeRequest; + OBEX_ServerAccept; + OBEX_SetTransportMTU; + OBEX_SetUserCallBack; + OBEX_SuspendRequest; + +} OPENOBEX_1.0; --- openobex-1.3/acinclude.m4.alt-symbol-versions 2006-08-11 16:38:36 +0400 +++ openobex-1.3/acinclude.m4 2006-08-11 22:12:09 +0400 @@ -44,6 +44,55 @@ AC_DEFUN([AC_INIT_OPENOBEX], [ AC_DEFINE_UNQUOTED(CONFIGDIR, "${configdir}", [Directory for the configuration files]) ]) +AC_DEFUN([AC_CHECK_VERSIONED_SYMBOLS], [ + AC_ARG_ENABLE(symbol-versions, + AC_HELP_STRING([--disable-symbol-versions], [do not compile shared library with versioned symbols]), + versioned="$withval", versioned="yes") + if test "$versioned" = "yes"; then + AC_CACHE_CHECK([whether -Wl,--version-script=... works], ac_cv_version_script_works, [ + cat <<ACEOF >conftest.ver +TEST_1.0 { +global: + test_1_0; +local: + *; +}; +TEST_1.1 { +global: + test_1_1; +} TEST_1.0; +ACEOF + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared -Wl,--version-script=conftest.ver" + AC_TRY_LINK([ + int test_1_0(void) + { + return 0; + } + int test_1_1(void) + { + return 1; + } + ], [], + [ac_cv_version_script_works=yes], + [ac_cv_version_script_works=no]) + LDFLAGS="$saved_LDFLAGS" + ]) + if test "$ac_cv_version_script_works" = "yes"; then + : + else + versioned=no + fi + fi + AC_MSG_CHECKING(for versioned symbols) + if test "$versioned" = "yes"; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + AM_CONDITIONAL(VERSIONED_SYMBOLS, test x$versioned = xyes) +]) + AC_DEFUN([AC_PATH_IRDA], [ AC_CACHE_CHECK([for IrDA support], irda_found, [ AC_TRY_COMPILE([ --- openobex-1.3/configure.in.alt-symbol-versions 2006-08-11 16:38:36 +0400 +++ openobex-1.3/configure.in 2006-08-11 22:05:23 +0400 @@ -18,6 +18,7 @@ m4_define([_LT_AC_TAGCONFIG], []) m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])]) AC_PROG_LIBTOOL +AC_CHECK_VERSIONED_SYMBOLS AC_PATH_IRDA AC_PATH_BLUEZ -- Sergey Vlasov [-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
next reply other threads:[~2006-08-11 18:44 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-08-11 18:44 Sergey Vlasov [this message] 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 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=20060811184453.GD15128@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