This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Strange linking problem (MIPS, n32): wrong version node forlibpthread!


Thiemo Seufer wrote:
> Kaz Kylheku wrote:
>> Hi Everyone,
>> 
>> I've discovered a silly problem on (MIPS, n32 ABI, gcc 4.1.1, glibc
>> 2.5, binutils 2.17, ...). 
>> 
>> I have a shared library which calls pthread functions. It is linked
>> with -pthread. However, this -pthread is not enough to actually link
>> it to libpthread.so. If you run ``ldd'' on the library image,
>> libpthread is not mentioned anywhere!
> 
> This was a bug in the gcc driver which is fixed in latest gcc HEAD.

Hi Thiemo,

I found your commit 125688 from last June:

	* config/mips/linux.h, config/mips/linux64.h (LIB_SPEC): Always
	imply -lpthread for -pthread.

Still, can anyone explain why not linking libpthread to your shared
library causes the symbols to resolve to other than the default version?
The resulting object simply requests an unversioned "pthread_create".

The default (marked @@) symbol version for pthread_create is the
GLIBC_2.3; that's what dlsym would find with RTLD_DEFAULT.  It's as if
dlsym is being called with RTLD_NEXT, which retrieves the GLIBC_2.0
version of the symbol.

Though I have the fix for the driver, I can't lay this to rest until I
understand. :)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]