home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / aix / 11665 < prev    next >
Encoding:
Text File  |  1992-11-17  |  2.1 KB  |  47 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!europa.asd.contel.com!emory!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!rpi!news.ans.net!newsgate.watson.ibm.com!yktnews!admin!minnie!gerth
  3. From: gerth@watson.ibm.com (John Gerth)
  4. Subject: Re: non-shared libraries
  5. Sender: news@watson.ibm.com (NNTP News Poster)
  6. Message-ID: <1992Nov18.033540.145069@watson.ibm.com>
  7. Date: Wed, 18 Nov 1992 03:35:40 GMT
  8. Distribution: usa
  9. Disclaimer: This posting represents the poster's views, not necessarily those of IBM
  10. References: <BxvqnJ.58@ansoft.com>
  11. Nntp-Posting-Host: minnie.watson.ibm.com
  12. Organization: IBM T.J. Watson Research Center
  13. Lines: 32
  14.  
  15. You can (with some effort) create binaries which include
  16. the library code, it's just that the system is defaulted
  17. and optimized for shared libraries.  The documentation for
  18. doing this is under 'ld' and has been somewhat improved
  19. in AIX 3.2 level of the man pages.
  20.  
  21. The basic idea is to create your application in two passes.
  22. In the first pass you make a new .o which is your code plus
  23. the non-shared library code:
  24.    ld -o nonshare.o -r -bnso ..... -lX11 -lXt ...
  25. Do not mention any of the libraries you do want shared in this step.
  26. In the second pass you run the new.o through with the shared libs:
  27.    cc nonshare.o ...... -lm ...
  28.  
  29. It is possible to link with non-shared libc, but it's slightly
  30. more complicated because of the way system calls are done (see
  31. the example in the man pages).  However, it's probably not going
  32. to buy you much to use a non-shared libc since most of the
  33. basic commands reference it - I doubt much of standard AIX would
  34. work without it.  Most unfortunately, this won't solve the
  35. running AIX 3.2 binary on AIX 3.1 because the system call
  36. lists for the kernel are not backwards compatible.
  37.  
  38. I've used this technique to do things like create an X11R4 xterm
  39. which I could copy to AIX 3.1 systems where X is R3.  It's usually
  40. straightforward but since any shared library can "import" things
  41. from other shared libraries, there are pitfalls.  The "dump -H"
  42. command is a big help in tracing the dependency chain.
  43.  
  44.  
  45. -- 
  46. John Gerth     gerth@watson.ibm.com        (914) 784-7639
  47.