mailing list of musl libc
 help / color / mirror / code / Atom feed
From: u-uy74@aetey.se
To: musl@lists.openwall.com
Subject: Re: Symbol versioning approximation trips on compat symbols
Date: Thu, 24 Jan 2019 10:28:46 +0100	[thread overview]
Message-ID: <20190124092846.GA30123@example.net> (raw)
In-Reply-To: <20190124014340.GV23599@brightrain.aerifal.cx>

On Wed, Jan 23, 2019 at 08:43:40PM -0500, Rich Felker wrote:
> The same issue came up before with libgcc defining and referencing a
> non-default-version symbol for some weird compatibility hack. I don't
> remember the details but Szabolcs Nagy was involved in investigating
> and might. In any case, the root cause is that musl's dynamic linker
> does not support symbol versioning; for the sake of being able to load
> libraries that were build with versioning, it always resolves a symbol
> to the "latest"/default version, the same as ld would do at link time.
> Normally this is the right thing as long as you don't actually have
> things that were linked against an old incompatible version, but it
> also breaks explicit linking to a particular version as in your
> example above.
> 
> The right fix is probably to add support for symbol version matching
> in the dynamic linker. Unfortunately this involves some extra logic in
> the extreme hot paths, so it's hard to make the cost unobservably low,
> and last I checked some members of the community were opposed to it on
> ideological grounds. If there's a good need for it (and I think just

IMVHO symbol versioning is basically aimed to hide the complexity of
the evolution of libraries, to make certain usage cases "just work".

OTOH it does not reduce the complexity under the hood but rather adds some
extra of it. That's why I see its impact as double negative, postulating
more complex tools and reducing the capacity of fellow integrators to
analyze their systems.

> avoiding silent breakage of third-party libs using versioning and
> intending for it to work is a fairly good one already), support can be
> added, but doing it without negative impact is a pretty big task.

This cost itself (of adding the support) means that some other useful
changes in musl will be missing at _every_ given time in the future
development. Is this workaround, for the sake of libraries who do unusual
hacks, really so important?

Rune



  reply	other threads:[~2019-01-24  9:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 17:57 Florian Weimer
2019-01-24  1:43 ` Rich Felker
2019-01-24  9:28   ` u-uy74 [this message]
2019-01-24 10:11     ` Florian Weimer
2019-01-24 11:09   ` Szabolcs Nagy
2019-01-24 11:18     ` Florian Weimer
2019-01-27  4:04       ` Rich Felker
2019-01-27  9:36         ` u-uy74
2019-01-28  6:34           ` Florian Weimer
2019-01-28  9:17             ` Timo Teras
2019-01-28 11:33               ` Szabolcs Nagy
2019-01-28 12:40             ` Szabolcs Nagy
2019-01-28 13:08             ` (OT?) Re: [musl] " u-uy74
2019-01-28 15:22               ` Markus Wichmann
2019-01-28 15:34                 ` Rich Felker
2019-01-28 15:29               ` Rich Felker
2019-01-29 17:13                 ` u-uy74
2019-01-30 14:57                   ` Rich Felker
2019-01-28 21:57             ` A. Wilcox
2019-01-28 22:52               ` Matias Fonzo
2019-01-28 23:12                 ` Zach van Rijn
2019-01-28 23:41                   ` A. Wilcox
2019-01-28 23:47                     ` Rich Felker
2019-01-29  3:22                       ` A. Wilcox
2019-01-29 19:40                         ` Matias Fonzo
2019-01-29 19:31                   ` Matias Fonzo

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=20190124092846.GA30123@example.net \
    --to=u-uy74@aetey.se \
    --cc=musl@lists.openwall.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).