home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / bsd / 5532 < prev    next >
Encoding:
Text File  |  1992-09-11  |  3.8 KB  |  78 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!cs.utexas.edu!uwm.edu!caen!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
  3. From: terry@cs.weber.edu (A Wizard of Earth C)
  4. Subject: Shared Libraries for 386BSD
  5. Message-ID: <1992Sep11.154912.25093@fcom.cc.utah.edu>
  6. Keywords: shared libraries X X11
  7. Sender: news@fcom.cc.utah.edu
  8. Organization: Weber State University  (Ogden, UT)
  9. References: <18lkkkINN14d@agate.berkeley.edu> <veit.716107923@du9ds3> <7dnL02y821gh01@JUTS.ccc.amdahl.com>
  10. Date: Fri, 11 Sep 92 15:49:12 GMT
  11. Lines: 65
  12.  
  13. In article <7dnL02y821gh01@JUTS.ccc.amdahl.com> gab10@griffincd.amdahl.com (Gary A Browning) writes:
  14. >I just finished installing X and noticed that most binaries are several times
  15. >larger than expected due to the lack of shared libraries.  I caught an article
  16. >posted here a few days back that quickly described the SysVr3 approach of using
  17. >fixed addresses for the libraries and the Sun/SysVr4 approach of using position
  18. >independent code.
  19. >
  20. >I tend to dislike the SysVr3 method since I got the impression that the source
  21. >code had to be written differently (though I am not sure why).  I also noted
  22. >that the GCC-2.2.2 compiler I just got compiled can produce PIC code which
  23. >would be one of the major hurdles for the SysVr4 method.
  24. >
  25. >Any knowledgable person want to talk a little more about the pros and cons of
  26. >these two (or any other) approach?
  27.  
  28.     Position independant code has a lot to recommend it, not the least
  29. of which is the ability to page the code in and out in pagesize hunks, and
  30. the ability map these pages, individually, into the end of the processes
  31. address space for the duration of their use (you would probably want to
  32. have room for two pages to take into account looping of execution across one
  33. page boundry).
  34.  
  35.     Fixed code can have the same thing done, but this usually involves
  36. swapping the library pages for low-core process pages (as opposed to the
  37. 3B1 method of locating the library at a known location, where the "stub"
  38. call routines actually do the calling by known address offset and each
  39. library is loaded to a fixed memory location above the "reasonable" size
  40. of a user process).
  41.  
  42.     VMS does it using an image, where a process may map sections of the
  43. image into it's own address space.  This was a compromise for persistant
  44. object mapping without a great deal of change to the OS itself.
  45.  
  46.     I personally vote for the PIC approach, since it seems to restrict
  47. the size of my programs less, and generally will not result in swapping
  48. out perfectly good real code in my program while there is space left at
  49. the end of my address range.
  50.  
  51.     The main problem with PIC is the nature of some of the errors
  52. in code generation with gcc 2.2.2, problems dealing with the code in
  53. gas (which still needs a lot of work to make PIC binaries), and the
  54. linker and kernel work necessary to link against "nonexistant" libraries
  55. and demand page a file other than our executable into our address space
  56. and execute it.  The other big win, that of loadable kernel modules, is
  57. actually achievable with the compiler that came with 386bsd, and doesn't
  58. PIC or gcc 2.2.2.
  59.  
  60. >What ever happened to the Jolix's special interest groups?  Wasn't one of them
  61. >addressing the shared library problem?
  62.  
  63.     I haven't heard of anything like this, except the sideways reference
  64. in Lynne's posting of a preferred newsgroup list.
  65.  
  66.  
  67.                     Terry Lambert
  68.                     terry_lambert@gateway.novell.com
  69.                     terry@icarus.weber.edu
  70. ---
  71. Any opinions in this posting are my own and not those of my present
  72. or previous employers.
  73. -- 
  74. -------------------------------------------------------------------------------
  75.                                         "I have an 8 user poetic license" - me
  76.  Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
  77. -------------------------------------------------------------------------------
  78.