NPTL MIPS, current git head, programs block on startup

Andreas Schultz andreas.schultz at gmail.com
Tue Apr 27 10:47:40 UTC 2010


2010/4/27 Timo Teräs <timo.teras at iki.fi>:
> Andreas Schultz wrote:
>>
>> 2010/4/27 Timo Teräs <timo.teras at iki.fi>:
>>>
>>> Andreas Schultz wrote:
>>
>> [...]
>>
>>> Uh. Is the application linked against libc before libpthread?
>>
>> The application is not directly linked against libpthread, but one of
>> the other libraries pulls it in.
>
> This has never worked on MIPS. Someone needs to implement the
> protected symbol support for mips ld.so.
>
>>> Check with ldd the order of how libraries are pulled in.
>>>
>>>> Looking at init.c my best guess would be that
>>>> .ptr__pthread_cleanup_push_defer should be initialized with
>>>> __pthread_cleanup_push_defer and not with _pthread_cleanup_push_defer
>>>> (two undelines instead of one).
>>>
>>> It's because MIPS ld.so is not supporting protected symbols yet.
>>> Mmm... Using the two underscore variant might help for immediate
>>> problems, but other things will broken unless protected symbols
>>> are implemented.
>>
>> The two underscore change alone is not sufficient, i have now managed
>> to get it working with the attached patch. Everything seems to fine so
>> far.
>
> Forgot to attach the patch?

ups, yes...

> I learned the hard way that it's not easily doable without the
> protected symbols. Otherwise you easily mess up one of the weird
> linking scenarios or how libc-libpthread interacts.

mhh, there seem to be lots of protected symbols.... :-(

>
>>> Changing linking order of application to pull in libpthread first
>>> should fix it too.
>>
>> I'll try that...
>
> Hacky solution for you is to add -lpthread for your main application.
> Proper solution is protected symbol support in ld.so.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 310-fix_symbol_confusion.patch
Type: text/x-patch
Size: 2386 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20100427/a2771126/attachment.bin>


More information about the uClibc mailing list