home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / aix / 8245 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  2.3 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!unixhub!unixhub.slac.stanford.edu!alhy
  2. From: alhy@unixhub.slac.stanford.edu (J. Scott Berg)
  3. Newsgroups: comp.unix.aix
  4. Subject: I am so confused! (Shared libraries)
  5. Message-ID: <4879@unixhub.SLAC.Stanford.EDU>
  6. Date: 28 Jul 92 11:01:52 GMT
  7. Sender: news@unixhub.SLAC.Stanford.EDU
  8. Reply-To: alhy@unixhub.slac.stanford.edu
  9. Organization: Stanford University, dept of Physics / SLAC
  10. Lines: 51
  11. Nntp-Posting-Host: courant.slac.stanford.edu
  12.  
  13. I want to do the following:
  14.  
  15. I have several routines, one routine each, in source files A1.f, A2.f,
  16. and A3.f.  I want these routines to be used in several programs (in
  17. reality I have not 3 but 150).  I compile each
  18.  
  19. xlf -O -c Ak.f
  20.  
  21. Lets say I write two programs B1 and B2 that use these routines.  I
  22. want to be able to do the following:
  23.  
  24. xlf -O B1.f -L/home/mylib -lstuff
  25.  
  26. The result of this should be that 
  27.  
  28.   1) If B1 only uses routine A1, only routine A1 and NOT A2,A3 should
  29.      be loaded
  30.   2) B1 should NOT contain a copy of A1
  31.   3) It would be nice if A1 (and A2, A3) were shared among all
  32.      applications using them.
  33.   4) /home/mylib/libstuff.a should be as small as possible (part of
  34.      that means that is has the minimum amount of symbol table 
  35.      information necessary to load)
  36.  
  37. So, how do I use ld or xlf to do this?  I have tried to be specific,
  38. since every time someone gives an answer to "how do I make a library
  39. shared?" a different answer is given (and every different answer
  40. produces a different result!  One of those answers just produced a
  41. 78MB library; it should be more like 1MB).
  42.  
  43. Does this make sense?  Have I been specific enough?  Is this possible?
  44. Am I insane to want to do this?  All help is greatly appreciated.  If
  45. what I want to do is impossible, the "closest" solution would also be
  46. appreciated. 
  47.  
  48. Thanks very much
  49.  
  50.                 -Scott Berg
  51.  
  52. -- 
  53. -------------------------------------------------------------------------------
  54. The opinions expressed here are, of course, my own and nobody else's.
  55. -------------------------------------------------------------------------------
  56. J. Scott Berg
  57. email: alhy@unixhub.slac.stanford.edu
  58. real mail: Varian Physics
  59.            Stanford  CA  94305-4060
  60. phone:    (415) 926-4732 (w)
  61.      (415) 328-8246 (h)
  62. -------------------------------------------------------------------------------
  63.  
  64.