Re: [jakub@redhat.com:Linking against libpthread via -pthread?



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

_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Exceed max spinlock?
    ... >> You can't just upgrade libc. ... You need a coherent set of libraries ... >> (rebuild libpthread from sync'd sources). ... My libpthread is less than 3 days old and I need to ...
    (freebsd-current)
  • Re: Exceed max spinlock?
    ... > You can't just upgrade libc. ... You need a coherent set of libraries ... > (rebuild libpthread from sync'd sources). ... My libpthread is less than 3 days old and I need to ...
    (freebsd-current)
  • Re: link error - xunlink unsatisfied
    ... It should be at the end together with all the other system libraries. ... But better be before libc. ... Because of the libpthread libc ordering? ... it would make absolutely no sense for it to fail: ...
    (comp.sys.hp.hpux)
  • Re: nss_ldap broken
    ... >> report any dependency on a threads library. ... > Too bad these shared libraries can't be made to use ... > also make it easier to use different thread libraries ...
    (freebsd-current)
  • Re: The case for twiggle ~ as an exponent sign.
    ... I have lina independant of libc. ... Linux fork() system call) work just fine. ... libraries. ... library isn't liked against libpthread there is only a single thread. ...
    (comp.lang.forth)