Andreas Schultz wrote:
2010/4/27 Timo Teräs <[email protected]>:
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?

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.

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.
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to