|
From: Naveen K. <g_n...@ya...> - 2005-08-09 22:12:26
|
>Here's a possible plan which might help NetBSD, >Solaris 8 >and MacOSX. The idea is to get rid of stage 1 >completely, and >turn stage 2 into a statically linked executable which >is >completely standalone -- it does not depend on either >libc or >on any dynamic linking library (ld.so). stage 2 would >also have >a non-standard load address, as it does currently. >Currently stage2 uses dlopen to load the tool. In >this >revised plan, tools would be statically linked to the >core, >so there would be a different stage2 for each tool >(valgrind_memcheck, valgrind_cachegrind, etc). >The result is (for each tool) a statically linked >valgrind >binary which can be started directly. >So .. I already tried out most of this -- the removal >of >stage1 and the static linking work at least on x86 >linux. >Another advantage is that there no longer any need for >address >space padding games to get stage2 to load at the >address we >want it to. Overall it appears to remove some >complexity and >Linux-specificness. >Once that's done, the next step is to rewrite the >address space >manager to be much more flexible about address space >layout. >We know from the FreeBSD folks that address space >layout issues >are at present a major problem in porting V to >FreeBSD, and >the same goes for MacOSX, so this seems like a good >thing for >lots of reasons. >J Solaris 10 doesn't allow static executables. The reasons they give are here http://docs.sun.com/app/docs/doc/817-1984/6mhm7pl10?a=view Solaris 8 allows it but I am doing most of my work on Solaris 10 now what with all the new bells and whistles (new syscall stuff etc) and what not. I had been wondering why stage2 wasn't being loaded directly in the first place. What you are suggesting though should still be ok for Solaris. All the libraries etc are loaded at the top of the address space so we still have the whole of the address space below stage2 for our use. Naveen __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |