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

  1. Xref: sparky comp.os.linux:10500 comp.unix.bsd:5559
  2. Path: sparky!uunet!olivea!spool.mu.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. Newsgroups: comp.os.linux,comp.unix.bsd
  5. Subject: Re: Shared libraries - info for 386BSD porting wanted
  6. Keywords: shared 386bsd
  7. Message-ID: <1992Sep11.214711.1389@fcom.cc.utah.edu>
  8. Date: 11 Sep 92 21:47:11 GMT
  9. References: <peter.716225737@hilly>
  10. Sender: news@fcom.cc.utah.edu
  11. Organization: Weber State University  (Ogden, UT)
  12. Lines: 63
  13.  
  14. In article <peter.716225737@hilly> peter@micromuse.co.uk (Peter Galbavy) writes:
  15. >Hi,
  16. >
  17. >Due to no response in the bsd group a couple of weeks ago, and the fact
  18. >I recently noticed that linux seems to have shared libraries I was
  19. >wondering if whoever knows *lots* about them can either (a) try to port
  20. >them or (b) help me port the implementaion across.
  21. >
  22. >I realise that this will not be a trivial operation, but it is a starting
  23. >point.
  24. >
  25. >At minimum, will someone tell me the "minimum working set" of linux source
  26. >files needed to understand how they are implemented. I take it there are
  27. >bits in exec() somewhere ? and the linker etc...
  28.  
  29.     You don't want to "port" the Linux code.  Linux is copylefted in
  30. a way contrary to the distribution policy for 386bsd, and the pieces we
  31. need are going to require the same amount of work with or without it.
  32.  
  33. Do this:
  34.  
  35.     o    Get gcc 2.2.2 working (can generate bad 386 code currently
  36.         if optimization or debugging is on).
  37.  
  38.     o    Make sure you can generate position independant code (PIC).
  39.  
  40.     o    Fix gas so that it can assemble the PIC output from 2.2.2
  41.         (currently, it can not).
  42.  
  43.     o    Patch the crt.o to look for LDPATH in the environment and
  44.         to call an initialization routine (you will need a default
  45.         path set).  You may also need per-library initialization
  46.         calles, so finding symbols which match an expression and
  47.         calling them may be required.
  48.  
  49. Once this is done, shared libraries require *trivial* kernel work and
  50. dynamic stubbing.
  51.  
  52. If you want to get fancy, we can make generation of shared library stub
  53. and initilization linkables be automatically handled as part of making
  54. the shared library.  This would probably be preferable, if one wanted to
  55. support copy-on-write for global data symbol definitions in a shared
  56. library, rather than simply lumping in non-sharable (writable) data in
  57. with every program as part of the stubs (ie: initial process load would be
  58. faster after one library using process has loaded).  Depends on how much
  59. linker work you were willing to do.
  60.  
  61. The big problem is PIC and gcc bugs.  The kernel side of things is trivial
  62. and doesn't require redistribution encumberances imported from Linux for
  63. us to figure out how to do it.
  64.  
  65.  
  66.                     Terry Lambert
  67.                     terry_lambert@gateway.novell.com
  68.                     terry@icarus.weber.edu
  69. ---
  70. Any opinions in this posting are my own and not those of my present
  71. or previous employers.
  72. -- 
  73. -------------------------------------------------------------------------------
  74.                                         "I have an 8 user poetic license" - me
  75.  Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
  76. -------------------------------------------------------------------------------
  77.