Question 19.36

How can I read in an object file and jump to routines in it?


You want a dynamic linker or loader. It may be possible to malloc some space and read in object files, but you have to know an awful lot about object file formats, relocation, etc. Under BSD Unix, you could use system and ld -A to do the linking for you. Many versions of SunOS and System V have the -ldl library which allows object files to be dynamically loaded. Under VMS, use LIB$FIND_IMAGE_SYMBOL. GNU has a package called ``dld''. See also question 15.13.


Read sequentially: prev next up top


This page by Steve Summit // Copyright 1995 // mail feedback