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

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!haven.umd.edu!darwin.sura.net!spool.mu.edu!yale.edu!qt.cs.utexas.edu!news.Brown.EDU!noc.near.net!news.cs.brandeis.edu!ST923150@pip.cc.brandeis.edu
  3. From: st923150@pip.cc.brandeis.edu
  4. Subject: Re: Shared Libs for X11?, was Re: 386bsd -- The New Newsgroup
  5. Message-ID: <1992Sep15.143458.15689@news.cs.brandeis.edu>
  6. Sender: news@news.cs.brandeis.edu (USENET News System)
  7. Reply-To: st923150@pip.cc.brandeis.edu
  8. Organization: Brandeis University
  9. References: <18iprpINNg6e@agate.berkeley.edu> <1992Sep8.200625.2894@socrates.umd.edu>     <veit.716026274@du9ds3> <18lkkkINN14d@agate.berkeley.edu>     <veit.716107923@du9ds3> <7dnL02y821gh01@JUTS.ccc.amdahl.com>     <veit.716291291@du9ds3> <1992Sep14.232949.9093@bby.com.au>,<veit.716561866@du9ds3>
  10. Date: Tue, 15 Sep 1992 14:34:58 GMT
  11. Lines: 19
  12.  
  13. Well, in a way, the mechanism involved by SunOS does use self-modifying code.
  14. Sorta, that is.  The executable image is modified in place immediately before
  15. execution begins.  A small kernel extension may be needed to alias the text
  16. segment to a r/w data segment (as Intel text segments are either execute only
  17. or execute/read, but not e/r/w).  Still, this is the simplest way I can think
  18. of to do good (i.e.- not fixed offset dependent where if you recompile the lib
  19. you must recompile all the executables that need it) shared libs.  All that is
  20. needed is writing a C code-generator preamble to call the dynamic linker in
  21. all executables, the dynamic linker itself, and maybe very small kernel mods
  22. to allow the dynamic linker to find the text and alias it as data.  There
  23. would be no need to reverse-engineer anything Sun did, and I doubt that the
  24. _concept_ is patentable (lawyer's opinion appreciated here).  The dynamic
  25. linker needed is actually _almost_ ld itself, and, indeed, were I to write
  26. it, I would do so by patching ld.  Small modifications to ld are also necessary,
  27. so that we get the needed library names (stuff that Sun puts in a struct
  28. called __DYNAMIC in each executable) into the executables, too.  Well, those
  29. are my thoughts.  I might volunteer to work on this, or at least part of it,
  30. if people think it is a viable approach...
  31. -ben
  32.