Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 May 2025 18:00:26 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Mark Johnston <markj@freebsd.org>
Cc:        Andriy Gapon <avg@freebsd.org>, FreeBSD Current <current@freebsd.org>
Subject:   Re: RTLD_DEEPBIND question
Message-ID:  <aCdTCjiKeT4QDN4e@kib.kiev.ua>
In-Reply-To: <aCdHgFCQA1ghPfYJ@nuc>
References:  <900c8521-559a-47b5-acaa-ae941f6852c4@freebsd.org> <fd12cce4-7e6b-4ab6-bced-b36e98c995ba@FreeBSD.org> <7c4e1682-d797-493c-8326-08d51dde3359@FreeBSD.org> <aAN69URjEJFuOLxR@kib.kiev.ua> <aAN9NH1IR-gZceP4@kib.kiev.ua> <e528f630-9d6e-4ec6-b7e6-30b5a978f5c8@freebsd.org> <59db8ace-770f-4f73-976f-411f6de0885a@FreeBSD.org> <aA4-hQ6xrF2dD-sJ@nuc> <5b887290-a6aa-49ff-aa92-f335ed09b9a5@freebsd.org> <aCdHgFCQA1ghPfYJ@nuc>

index | next in thread | previous in thread | raw e-mail

On Fri, May 16, 2025 at 10:11:12AM -0400, Mark Johnston wrote:
> On Fri, May 16, 2025 at 03:22:52PM +0300, Andriy Gapon wrote:
> > On 27/04/2025 17:26, Mark Johnston wrote:
> > > On Thu, Apr 24, 2025 at 08:56:44AM +0300, Andriy Gapon wrote:
> > > > On 23/04/2025 21:56, Andriy Gapon wrote:
> > > > > BTW, I've been wondering how illumos avoids the problem even though they
> > > > > do not use any special dlopen flags.
> > > > > It turns out that they link almost all system shared libraries with
> > > > > -Bdirect option (which is Solaris/illumos specific).
> > > > > It's somewhat similar to, but different from, -Bsymbolic.
> > > > > https://docs.oracle.com/cd/E23824_01/html/819-0690/aehzq.html#scrolltoc
> > > > > https://docs.oracle.com/cd/E36784_01/html/E36857/gejfe.html
> > > > 
> > > > Oh, and it looks like there is an even better explanation for illumos.
> > > > There is a version map file for libdtrace which explicitly lists API
> > > > functions and makes everything else local.
> > > > https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libdtrace/common/mapfile-vers
> > > > 
> > > > I wonder why we didn't do the same when porting.
> > > > Maybe we should do that now?
> > > 
> > > I don't have any objection, but I believe adding a version map after the
> > > fact doesn't accomplish much, assuming that we care deeply about ABI
> > > stability in libdtrace.so (I'm not sure we do though).
> > 
> > My primary goal here is not ABI stability, but hiding symbols that really
> > should not be exported.  See more at the end.
> > 
> > At the same time I am not sure why it could be too late to start caring
> > about ABI stability now.  Assuming we actually would want to do that.
> 
> I just mean that the version map helps only helps provide stability for
> binaries linked to libdtrace.so after the version map is introduced.
This is one of the reason why versioning the library requires bumping
the .so file version.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aCdTCjiKeT4QDN4e>