Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!hp9000.csc.cuhk.hk!uakari.primate.wisc.edu!caen!uunet!dtix!darwin.sura.net!bogus.sura.net!pandora.pix.com!stripes From: stripes@pix.com (Josh Osborne) Newsgroups: comp.unix.bsd Subject: Re: Shared Libs for X11?, was Re: 386bsd -- The New Newsgroup Keywords: shared libraries X X11 Message-ID: <BuFoH7.6Io@pix.com> Date: 11 Sep 92 21:46:18 GMT References: <18lkkkINN14d@agate.berkeley.edu> <veit.716107923@du9ds3> <7dnL02y821gh01@JUTS.ccc.amdahl.com> Sender: news@pix.com (The News Subsystem) Organization: Pix Technologies -- The company with no adult supervision Lines: 38 Nntp-Posting-Host: pandora.pix.com In article <7dnL02y821gh01@JUTS.ccc.amdahl.com> gab10@griffincd.amdahl.com (Gary A Browning) writes: [...] [...SVR3 uses fixed addresses, SVR4/SunOS uses PIC...] >I tend to dislike the SysVr3 method since I got the impression that the source >code had to be written differently (though I am not sure why). I also noted >that the GCC-2.2.2 compiler I just got compiled can produce PIC code which >would be one of the major hurdles for the SysVr4 method. > >Any knowledgable person want to talk a little more about the pros and cons of >these two (or any other) approach? PIC code runs slower on some CPU's (ones that don't do PC indexed load/stores as fast as dirrect load/stores, in fact I bet *some* code can't be PIC'ed as fast as abs'ed on any CPU, but I won't be much). Shared libs linked to an absolute address (a) are hard to update (you can't change the entry points), and (b) all shared libs must be maped to diffrent places, or they won't work together (i.e. libc can't overlap libX11, and if libgdb overlaps libXt, then you can't link with both libXt and libgdb...). I'm not sure why you would need to write absolute address'ed shared libs diffrently from PIC'ed ones, but I know both have some problems with staticly allocated local variables (but this is implmention dependent). I susspect that absolute addressed shared libs are easyer to implment. Nither should need support from the kernel, but it may be easyer/faster to do it that way. (I am assuming that we have a working mmap...). >Anyone kept up with the Linux discussions of shared library implementations? >Can you summarize? Sorry, I don't know a thing about them. -- stripes@pix.com "Security for Unix is like Josh_Osborne@Real_World,The Multitasking for MS-DOS" "The dyslexic porgramer" - Kevin Lockwood We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise. - Larry Wall