From: Alexey Tourbin <at@altlinux.ru> To: ALT Linux Team development discussions <devel@lists.altlinux.org> Subject: Re: [devel] symbols into dependencies Date: Tue, 17 Nov 2009 04:10:27 +0300 Message-ID: <20091117011027.GZ10659@altlinux.org> (raw) In-Reply-To: <20091116002722.GB32432@wo.int.altlinux.org> [-- Attachment #1: Type: text/plain, Size: 2599 bytes --] On Mon, Nov 16, 2009 at 03:27:23AM +0300, Dmitry V. Levin wrote: > On Mon, Nov 16, 2009 at 03:16:42AM +0300, Alexey Tourbin wrote: > [...] > > Да, "концептуальная" модель именно такая -- отслеживать символы > > внутри сонейма. > > > > Provides: (libfoo.so.1;foo_sym1,foo_sym2,foo_sym3,...) > > Requires: (libfoo.so.1;foo_sym1,foo_sym2) > > To match ELF semantics, we have to implement smth more complicated: > > libfoo Provides(ELF): foo_sym1,foo_sym2,... > libbar Provides(ELF): bar_sym1,bar_sym2,... > client Requires(ELF): libfoo,libbar:foo_sym1,...,bar_sym1,... So what is your model here? Providing global symbols (without soname context) is wrong: until the library is open and mmap'd, a symbol means nothing. It is just a name clash until then. A collision. So, to match ELF semantics, which is to allow symbols be moved across the libraries, the model can be like this: libfoo Provides(ELF): libfoo:foo_sym1,foo_sym2,... libbar Provides(ELF): libbar:bar_sym1,bar_sym2,... client Requires(ELF): libfoo,libbar:foo_sym1,...,bar_sym1,... To resolve the Requires dependency is then to check that each symbol foo_sym1,...,bar_sym1,... can be resolved into at least one _required_ library. Or, in terms of sets, requires set should be a subset of the union of provides sets, with the union calculated for the appropriate sonames. However, if we consider "tegent problem" again, we have to admit that this whole blasted thing still does not provide close-enough ELF semantics. The problem is that "tgetent" was part of libncurses, and then libtinfo emerged as a separate library. And older binaries are not linked with libtinfo, so it won't be possible to resolve their undefined symbols against the _required_ libraries. Look, the next step in improving the model is to implement recursive symbols lookup (i.e. "passing on" of symbols down the river). Now, if you think about this a few more minutes, you have to recognize that we are actually going to reimplement some parts of dynamic linker within rpm dependency mechanism. > And there is also symbol versioning that makes the picture even more > complex. So, to follow ELF semantics the way dynamic linker does, you simply end up with reimplementing certain parts of the dynamic linker. And not only the linker, but special kind of dependencies are required to mimic certain ELF data structures (e.g. set-union). Which is indeed complicated. I argue that we do not follow ELF semantics that much closely. The whole thing should be boiled down to a much simpler model. [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-11-17 1:10 UTC|newest] Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-11-13 8:36 [devel] SharedLibsPolicy или хорошо что мы не Debian Valery V. Inozemtsev 2009-11-13 10:42 ` Anton Farygin 2009-11-13 11:14 ` Damir Shayhutdinov 2009-11-13 11:17 ` Anton Farygin 2009-11-13 11:26 ` Led 2009-11-13 11:27 ` Damir Shayhutdinov 2009-11-13 11:33 ` Valery V. Inozemtsev 2009-11-13 11:37 ` Damir Shayhutdinov 2009-11-13 11:44 ` Anton Farygin 2009-11-13 11:46 ` Valery V. Inozemtsev 2009-11-13 12:18 ` Damir Shayhutdinov 2009-11-13 11:56 ` Денис Смирнов 2009-11-18 19:17 ` Yury Aliaev 2009-11-19 2:40 ` Денис Смирнов 2009-11-19 7:20 ` Yury Aliaev 2009-11-13 16:07 ` Igor Vlasenko 2009-11-13 16:40 ` Anton Farygin 2009-11-13 17:12 ` Igor Vlasenko 2009-11-13 17:19 ` Anton Farygin 2009-11-18 19:19 ` Yury Aliaev 2009-11-13 12:22 ` Sergey V Turchin 2009-11-13 21:25 ` [devel] SharedLibsPolicy Michael Shigorin 2009-11-13 21:39 ` Led 2009-11-13 22:55 ` Michael Shigorin 2009-11-13 23:17 ` Led 2009-11-14 9:53 ` Michael Shigorin 2009-11-14 20:25 ` Денис Смирнов 2009-11-14 20:45 ` Led 2009-11-14 22:20 ` Денис Смирнов 2009-11-14 22:30 ` Led 2009-11-14 22:55 ` Денис Смирнов 2009-11-14 23:19 ` Led 2009-11-15 0:46 ` Денис Смирнов 2009-11-15 1:36 ` Led 2009-11-15 7:06 ` Денис Смирнов 2009-11-15 20:00 ` Led 2009-11-15 20:27 ` Michael Shigorin 2009-11-15 21:01 ` Led 2009-11-15 21:27 ` Michael Shigorin 2009-11-15 22:20 ` Anton Farygin 2009-11-15 21:14 ` [devel] symbols into dependencies Alexey Tourbin 2009-11-15 22:47 ` Led 2009-11-15 23:11 ` Alexey Tourbin 2009-11-15 23:43 ` Led 2009-11-16 0:16 ` Alexey Tourbin 2009-11-16 0:27 ` Dmitry V. Levin 2009-11-17 1:10 ` Alexey Tourbin [this message] 2009-11-16 0:05 ` Dmitry V. Levin 2009-11-16 0:44 ` Alexey Tourbin 2009-11-16 9:46 ` Sergey Vlasov 2009-11-16 10:48 ` Dmitry V. Levin 2009-11-16 11:36 ` Alexey Tourbin 2009-11-16 12:01 ` Damir Shayhutdinov 2009-11-16 12:17 ` Alexey Tourbin 2009-11-16 12:50 ` Sergey Vlasov 2009-11-16 13:09 ` Alexey Tourbin 2009-11-16 8:16 ` Stanislav Ievlev 2009-11-15 22:01 ` [devel] SharedLibsPolicy Sergey Vlasov 2009-11-15 22:54 ` Led 2009-11-15 12:08 ` Igor Vlasenko 2009-11-15 13:30 ` Michael Shigorin 2009-11-15 19:11 ` Michael Shigorin 2009-11-15 19:36 ` Денис Смирнов 2009-11-15 20:29 ` Michael Shigorin 2009-11-15 19:36 ` Konstantin Pavlov 2009-11-15 19:39 ` Денис Смирнов 2009-11-14 20:31 ` [devel] SharedLibsPolicy или хорошо что мы не Debian Денис Смирнов 2009-11-14 23:14 ` Anton Farygin 2009-11-15 12:24 ` Michael Shigorin
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=20091117011027.GZ10659@altlinux.org \ --to=at@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