Loading and Executing Object Code at Runtime

Guy Harris guy at auspex.auspex.com
Mon Feb 18 08:29:43 AEST 1991


>>	(*funcp)(test);
>
>This is, if you will pardon the hand waving, "different."  This is an idiom
>the compiler knows about, and it spits out the correct code.

I suspect just about *any* software that let you load and execute object
code at runtime from C would use said idiom - i.e., you ask it "load up
thus-and-such an object file", and then ask it "here's a function name,
give me a pointer to that function", and then call the function through
that pointer - so I suspect that just about *any* software that would
let you load and execute object code at runtime wouldn't be bitten by
that problem on a *86.  (For instance, the "dlopen()"/"dlsym()" code in
S5R4 works that way, and I suspect its moral equivalent in OSF/1 does so
as well.)



More information about the Comp.unix.internals mailing list