Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Aug 2006 14:20:58 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Jeremie Le Hen <jeremie@le-hen.org>
Cc:        Daniel Eischen <deischen@freebsd.org>, kan@freebsd.org, freebsd-current@freebsd.org, imp@freebsd.org
Subject:   Re: [fbsd] Re: Where is thr_getscheduler
Message-ID:  <20060816112058.GA1483@deviant.kiev.zoral.com.ua>
In-Reply-To: <20060816110526.GA57815@obiwan.tataz.chchile.org>
References:  <20060801211657.GA29737@troutmask.apl.washington.edu> <20060801212742.GB13841@heff.fud.org.nz> <20060801213803.GB9583@troutmask.apl.washington.edu> <20060802144255.GU69505@over-yonder.net> <20060802165604.GA970@troutmask.apl.washington.edu> <Pine.GSO.4.64.0608021303120.7796@sea.ntplx.net> <20060802172505.GA1935@troutmask.apl.washington.edu> <20060804050242.GC58082@funkthat.com> <20060804082050.GE59809@deviant.kiev.zoral.com.ua> <20060816110526.GA57815@obiwan.tataz.chchile.org>

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

--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 16, 2006 at 01:05:26PM +0200, Jeremie Le Hen wrote:
> Hi,
>=20
> On Fri, Aug 04, 2006 at 11:20:50AM +0300, Kostik Belousov wrote:
> > Old build of the application linked against libc.so.6 and libthr.so.2.
> > References to symbols in libthr.so.2 are satisfied by default
> > version of the symbols.=20
> >=20
> > Missing are two things:
> >=20
> > 1. libpthread/libthr are still not linked against libc (as well as most
> > shared libraries). Correspondingly, version information for referenced
> > libc symbols is absent in the shared libraries.
>=20
> What does exactly prevent from linking shared libraries against libc ?
> In this post [1] Warner Losh states that doing so would solve some
> problems (probably the one we are talking about, albeit firefox-bin being
> linked against libc.so.6 would conflict with libthr.so.2 being linked
> against libc.so.7 -- how rtld(1) would handle this ?), but it will
> also create so problems.  What are they ?
>=20
> [1] http://lists.freebsd.org/pipermail/freebsd-hackers/2006-April/016143.=
html
>=20
> I've added Warner in the Cc: list.

As I understand, the current state of not linking dso with libc
comes from the time of RELENG_4. There are (were) two libc's: libc
and libc_r. Since both libraries provide same symbols, existence of them
in one image would cause the havoc. Dso cannot know in advance, whether
the final image would use libc or libc_r (the only exception is dso
that uses threads by itself). As result, no -lc for dso.

Moreover, when the -lc switch somehow slipped in (I remember this for libGL=
.so),
it causes huge problems with threaded programs that tried to use that dso.

The current way of linking simply have not changed since then.

For real symbol versioning support, linking with libc is the must. And, now
this is possible due to single libc and separation of libpthread/libthr into
separate dso.

Resulting system will be much stricter with respect to mixing dso's from
old-libc system and new one. This is never was supported, but, for instance,
x11 libraries compiled on RELENG_6, can by used on CURRENT without much
problems. After that change, no such frivolous mixing will ever work
for bumped libraries version.

--bp/iNruPH9dso1Pn
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFE4v+aC3+MBN1Mb4gRArGZAJ9lJJW2SHa3xZD8/MddGW2yfiLwjQCgmQXU
KMeS7mLuSnut+Tx6zOEjHWA=
=nzKu
-----END PGP SIGNATURE-----

--bp/iNruPH9dso1Pn--



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