Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bria!mike Newsgroups: comp.unix.wizards Subject: Re: Loading and Executing Object Code at Runtime Message-ID: <437@bria> Date: 14 Feb 91 07:22:52 GMT References: <1991Feb13.212704.7016@cec1.wustl.edu> Reply-To: uunet!bria!mike Organization: MGI Group International, Los Angeles, CA Lines: 28 In an article, flan@cics.Berkeley.EDU (Ian Flanigan) writes: >Hi, > >I tried posting this to comp.unix.questions first, but as I got no answer >I figured this must be a Wizard level question: > >I'm wondering how to load an object file (my_functions.o) at execution >time and execute a function contained therein. I know this is possible >since many flavors of LISP allow you to compile your functions and then >load the compiled versions later. When you are talking about compiling functions and loading the compiled versions later, are you talking about using a linkage editor to build a runable image? If you're trying to do what it looks like you're trying to do, the answer is "you can't get there from here." You would have open the object file, load the function within the context of the current process (a real trick), allocate the core for data, stack, and bbs, push the stack frame, and jump to the address of this arbitrary function. Just ain't no way you can be doin' this in user mode. -- Michael Stefanik | Opinions stated are not even my own. Systems Engineer, Briareus Corporation | UUCP: ...!uunet!bria!mike ------------------------------------------------------------------------------- technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly found to be saying things like "Well, it works on my DOS machine ..."