Article View: comp.sys.dec
Article #5741Re: Runtime loading of shareable images
From: Martin Brunecky
Date: Mon, 12 Mar 1990 15:44
Date: Mon, 12 Mar 1990 15:44
30 lines
2091 bytes
2091 bytes
In article <27705@cup.portal.com> Prodas@cup.portal.com (Henry Lewis Feldman) writes:
>I have a question about run-time dynamic linking.
>
>I am working on a C program that during run-time must choose between
>several different subroutines. Ideally these run-time subroutines
>should be "shareable images". But is there a program callable routine
>that will dynamically load an image, my reading of the linker is that
>link to the shareable image is fixed at link time. My program must choose
>between one of many images after the program has started.
>
>Can anyone point me to the proper routines?
What about operating system ???
Assuming VMS, look at LIB$FIND_IMAGE_SYMBOL. Does everything you need.
Be carefull about logical name for the loaded shareable image.
Must always be the same, otherwise you may end up with the same image
loaded multiple times.
I have a Macro module, acting as a dynamic loader, and a set of tools
that allow us to build images with "stub" rerferences to dynamically
called shareable images. At runtime, those stubs are re-built on the
first request to a particular entry, so that subsequent call overhead
on call to an entry in shareable image is 1 JMP instruction, i.e. the
same as if you bind to shareable image at link time.
--
=*= Opinions presented here are solely of my own and not those of Auto-trol =*=
Martin Brunecky marbru@auto-trol.COM
(303) 252-2499 {...}ncar!ico!auto-trol!marbru
Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404
Technical Details
Message-ID:
<764@auto-trol.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!asuvax!ncar!ico!auto-trol!marbruReferences:
<1062@eastman.UUCP> <27705@cup.portal.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!asuvax!ncar!ico!auto-trol!marbru From: marbru@auto-trol.UUCP (Martin Brunecky) Newsgroups: comp.sys.dec,comp.os.vms Subject: Re: Runtime loading of shareable images Message-ID: <764@auto-trol.UUCP> Date: 12 Mar 90 15:44:46 GMT References: <1062@eastman.UUCP> <27705@cup.portal.com> Reply-To: marbru@auto-trol.COM (Martin Brunecky) Distribution: usa Organization: Auto-trol Technology, Denver Lines: 30