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