home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / aix / 8990 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  1.5 KB

  1. Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!hal.gnu.ai.mit.edu!mycroft
  2. From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: Shared libraries sharing from main app?
  5. Message-ID: <1992Aug21.200831.6937@mintaka.lcs.mit.edu>
  6. Date: 21 Aug 92 20:08:31 GMT
  7. References: <1992Aug20.220555.25326@spss.com> <MARC.92Aug21090935@marc.watson.ibm.com> <1992Aug21.173329.1517@mintaka.lcs.mit.edu>
  8. Sender: news@mintaka.lcs.mit.edu
  9. Organization: /etc/organization
  10. Lines: 26
  11.  
  12.  
  13. In article <1992Aug21.173329.1517@mintaka.lcs.mit.edu>
  14. mycroft@hal.gnu.ai.mit.edu (Charles Hannum) writes:
  15. >
  16. > Xmain (int argc, char **argv, char **envp)
  17. > X{
  18. > X  loadbind (0, main, foo);
  19.  
  20. I find it very distressing that I have to do this from within the main
  21. executable.  (It can't be done within the shared library, because you
  22. can't get the pointer to main() that you need without using loadquery()
  23. and knowing the name of the executable otherwise.  Make sense?  Oh
  24. well.)
  25.  
  26. This really *bites*.  A large part of the reason I even cared about
  27. shared libraries was that I had the (now shattered) fantasy that I
  28. could make various libraries used to link multiple programs shared,
  29. without making modifications to the programs using them.
  30.  
  31. It turns out that, in general, I can't.  I don't see why the system
  32. fundamentally can't do this sort of reverse-linking at run time; it has
  33. all the mechanism to do it, but it simply doesn't.
  34.  
  35. -- 
  36.  \   Charles Hannum, mycroft@ai.mit.edu
  37.  /\  White heterosexual atheist male (WHAM) pride!
  38.