Re: [jakub_at_redhat.com:Linking against libpthread via -pthread?

From: Daniel Eischen <deischen_at_freebsd.org>
Date: Sat, 11 Feb 2006 13:23:20 -0500 (EST)
On Sat, 11 Feb 2006, Alexander Kabaev wrote:

> On Sat, Feb 11, 2006 at 09:39:08AM -0500, Daniel Eischen wrote:
> >
> > Why?  If one _really_ needs a shared library linked to libpthread,
> > -lpthread will always work.
> >
> > --
> > DE
> >
> Just think for a moment how exactly will your shared library depend
> on a specific symbol version in C or thread libraries if no
> dependencies on libc.so.6 and libpthread.so.2 were recorded in the
> first place? When no -lc or -lpthreed were seen by ld at all?
> The symbol is defined by a name, version and library's SONAME.

Well, so far we want libthr and libpthread to use the same symbols
with the same map name so this can all just work regardless of
which thread library you use.  I can see why this is really,
really, needed for libc where you really want symbol versioning
to work.  I'm just wondering if there is a way for the thread
libraries to do necessary versioning within libc.  Like adding
all the pthread_ interfaces into libc as stubs (we already do
some of them and the thread libraries stuff their functions
into a jump table).  But I see that without actually linking
to a thread library, symbol versioning won't work for the
thread libraries unless we play games with libc or some other
stub library (which then loads the appropriate thread library).

-- 
DE
Received on Sat Feb 11 2006 - 17:23:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:52 UTC