Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel!munnari.oz.au!spool.mu.edu!caen!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry From: terry@cs.weber.edu (A Wizard of Earth C) Subject: Re: Shared Libs for X11?, was Re: 386bsd -- The New Newsgroup Message-ID: <1992Sep16.165446.20508@fcom.cc.utah.edu> Sender: news@fcom.cc.utah.edu Organization: Weber State University (Ogden, UT) References: <1992Sep14.232949.9093@bby.com.au> <2aFn02vQ22Jx01@JUTS.ccc.amdahl.com> <veit.716642669@du9ds3> Date: Wed, 16 Sep 92 16:54:46 GMT Lines: 52 In article <veit.716642669@du9ds3> veit@du9ds3.uni-duisburg.de writes: >In <2aFn02vQ22Jx01@JUTS.ccc.amdahl.com> gab10@cd.amdahl.com (Gary A Browning) writes: > >>In article <1992Sep15.143458.15689@news.cs.brandeis.edu>, >>st923150@pip.cc.brandeis.edu writes: >>> Well, in a way, the mechanism involved by SunOS does use >>> self-modifying code. >>> Sorta, that is. The executable image is modified in place immediately >>> before >>> execution begins. > >>Does this make the text of the executable non-sharable between multiple >>processes? Or is the O/S smart enough to recognize that, though modified, each >>process would be running the same modifications and therefore the text is >>sharable? > >>-- >>Gary Browning | Exhilaration is that feeling you get just after a >> | great idea hits you, and just before you realize >> | what is wrong with it. > >This should not influence sharing of text segments between processes. The code >is the same for both processes and will be seen by the processes at the same >virtual address. There are no references to absolute physical addresses which >could cause the code to be position dependent. Besides which, it's a text page containing the jump vectors rather than a text page within the shared library itself. All pages within the shared library are shared initially. Data pages are copy-on-write, so they may not remain shared. The trick of this is -- is the page with the jump table vectors shared or not? The assumption is that it should be. Does this mean that the text page is modified on initial but not subsequent loads, and shared, or does it mean that there are one or more text pages per process which contain the jump table vectors and are not shared? More investigation, I guess... in either case, the jump table vectors are text pages from the process rather than text pages from the shared library (otherwise *all* code would have to be compile PIC). Terry Lambert terry_lambert@gateway.novell.com terry@icarus.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers. -- ------------------------------------------------------------------------------- "I have an 8 user poetic license" - me Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial -------------------------------------------------------------------------------