>There are pthread_create symbols in libphread.so, libthread.so and libc.so. >The following symbols displayed with the nm command:
This is only relevant to Solaris 9 and earlier, not Solaris 10 or OpenSolaris (in this particular case) >The pthread_create() returns -1 linking only libc.so, and work properly >linking both libc.so and libpthread.so in spite of link's ordering. >I understand it is realized using "#pragma weak", so I tried to make a program >to do the same in the following programs, but I can't. >The foo() returns 0 in main.c when linking libfoo.so before libdummy.so, >that is to say, "cc main.c -lfoo -ldummy", but foo() returns -1 when linking >libdummy.so before libfoo.so, that is to say, "cc main.c -ldummy -lfoo". >Could someone tell me about this mechanism? That's precisely that you'd expect to happen as you've made foo weak in both libraries, so the first one wins. The libc/thread bits were slightly more convoluted. Casper _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
