Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 May 1998 15:38:56 +1000 (EST)
From:      John Birrell  <jb@cimlogic.com.au>
To:        hasty@rah.star-gate.com (Amancio Hasty)
Cc:        jb@cimlogic.com.au, current@FreeBSD.ORG
Subject:   Re: pthreads and thread-specific?
Message-ID:  <199805310538.PAA13512@cimlogic.com.au>
In-Reply-To: <199805310521.WAA19570@rah.star-gate.com> from Amancio Hasty at "May 30, 98 10:21:00 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Amancio Hasty wrote:
> 
> {hasty} ldd Barrier_Test
> Barrier_Test:
>         libACE.so => /usr/lib/libACE.so (0x28052000)
>         libc_r.so.3 => /usr/lib/libc_r.so.3 (0x2815b000)
>         libstdc++.so.2 => /usr/lib/libstdc++.so.2 (0x281e3000)
>         libg++.so.4 => /usr/lib/libg++.so.4 (0x2821a000)
>         libm.so.2 => /usr/lib/libm.so.2 (0x28257000)
>         libc.so.3 => /usr/lib/libc.so.3 (0x28271000)
>         libc_r.so.3 => /usr/lib/libc_r.so.3 (0x2815b000)

If you used gcc -pthread to link the program, libc shouldn't be there
_at all_ and libc_r should be last. If this list is the order that the
linker resolved symbols, then any libc/libc_r functions that libstdc++
and libg++ reference (that haven't already been referenced by libACE
and directly by your application) will use those from libc, not libc_r.

>         libstdc++.so.2 => /usr/lib/libstdc++.so.2 (0x281e3000)
>         libg++.so.4 => /usr/lib/libg++.so.4 (0x2821a000)
>         libm.so.2 => /usr/lib/libm.so.2 (0x28257000)
> 
> Looks like I am pulling the right libraries. I will browse at the
> code a little bit more.

I beg to differ. Please link your application properly using gcc -pthread
and don't declare libc_r on the command line.


-- 
John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/
CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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