Jonathan Adams wrote:
> On Mon, Nov 29, 2010 at 01:32:27PM -0800, Afantee Lee wrote:
>> Hi, 
>> I am trying to replace the pthread library under Solaris with my own.  My
>> plan is to modify the code from OpenSolaris (adding lots of profiling code),
>> and compile it as a dynamic lib. then, replace the one under Solaris with my
>> own.
>>
>> the question is: will this replacement work ? (if I did not the pthread code
>> from Opensolaris at all)
> 
> In Solaris 10 and later (including Opensolaris), the threading library is
> entirely contained in libc, and libc is definitely in on the joke.  You'd
> probably need to have your own version of libc to have any chance of this
> working.

And even at that, libc is intimately tied to the undocumented kernel
system call interface which can (and does) change fairly frequently,
even in patches.  That's why libc.so.1 is almost always in the kernel
jumbo patch.

I wouldn't expect a libc compiled on OpenSolaris to work very well on
any Solaris ... other than maybe the new Solaris Express.  (Where "not
working well" means that your modified system will almost certainly fail
to boot up at all.)

Why not just do the work you're planning on OpenSolaris and leave it at
that?

Or perhaps better yet: just use dtrace to instrument whatever you want
on Solaris 10 or OpenSolaris, and avoid having to compile anything at all.

-- 
James Carlson         42.703N 71.076W         <carls...@workingcode.com>
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to