home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / bsd / 5557 < prev    next >
Encoding:
Internet Message Format  |  1992-09-11  |  2.5 KB

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