home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!unixhub!unixhub.slac.stanford.edu!alhy
- From: alhy@unixhub.slac.stanford.edu (J. Scott Berg)
- Newsgroups: comp.unix.aix
- Subject: I am so confused! (Shared libraries)
- Message-ID: <4879@unixhub.SLAC.Stanford.EDU>
- Date: 28 Jul 92 11:01:52 GMT
- Sender: news@unixhub.SLAC.Stanford.EDU
- Reply-To: alhy@unixhub.slac.stanford.edu
- Organization: Stanford University, dept of Physics / SLAC
- Lines: 51
- Nntp-Posting-Host: courant.slac.stanford.edu
-
- I want to do the following:
-
- I have several routines, one routine each, in source files A1.f, A2.f,
- and A3.f. I want these routines to be used in several programs (in
- reality I have not 3 but 150). I compile each
-
- xlf -O -c Ak.f
-
- Lets say I write two programs B1 and B2 that use these routines. I
- want to be able to do the following:
-
- xlf -O B1.f -L/home/mylib -lstuff
-
- The result of this should be that
-
- 1) If B1 only uses routine A1, only routine A1 and NOT A2,A3 should
- be loaded
- 2) B1 should NOT contain a copy of A1
- 3) It would be nice if A1 (and A2, A3) were shared among all
- applications using them.
- 4) /home/mylib/libstuff.a should be as small as possible (part of
- that means that is has the minimum amount of symbol table
- information necessary to load)
-
- So, how do I use ld or xlf to do this? I have tried to be specific,
- since every time someone gives an answer to "how do I make a library
- shared?" a different answer is given (and every different answer
- produces a different result! One of those answers just produced a
- 78MB library; it should be more like 1MB).
-
- Does this make sense? Have I been specific enough? Is this possible?
- Am I insane to want to do this? All help is greatly appreciated. If
- what I want to do is impossible, the "closest" solution would also be
- appreciated.
-
- Thanks very much
-
- -Scott Berg
-
- --
- -------------------------------------------------------------------------------
- The opinions expressed here are, of course, my own and nobody else's.
- -------------------------------------------------------------------------------
- J. Scott Berg
- email: alhy@unixhub.slac.stanford.edu
- real mail: Varian Physics
- Stanford CA 94305-4060
- phone: (415) 926-4732 (w)
- (415) 328-8246 (h)
- -------------------------------------------------------------------------------
-
-