WHIT@uwastm.phys.washington.EDU ("John Whitmore, III ") (05/18/88)
>From: Rudolph Shally <ras%hep.nrc.cdn%ean.ubc.ca@RELAY.CS.NET> >To: Richard Seymour <SEYMOUR@phast> >Reply-to: INFO-VAX@KL.SRI.COM >Comments: To: info-vax@KL.SRI.COM > >The problem is how to override a routine in a shareable image. >The image contains several routines, say 1000 and many of those >call another routine (say QNEXTE) in the same image. QNEXTE >in turn, calls another routine, say, QNEXT. In VAX macro the call is >(in QNEXTE): > > CALLS #0,QNEXT > >The trouble is that QNEXT is supposed to be a user supplied routine >while I had to include a dummy routine QNEXT in the shareable image >since everything must be linked. When the user links his main program >and his own QNEXT with the shareable image the linker won't accept >the user supplied routine QNEXT since a dummy version is already >in the shareable image. How can one owerride the dummy routine? The creating LINK for the shared executable had to include a reference for the QNEXT routine, or fail to LINK successfully. The reference can be any of a number of things: a *.OBJ object module file, a shareable image, or an object or shareable image library Unfortunately, the shared executable will incorporate an object module if it is given one, and this cannot be later "un-LINKed" to allow the user his desired QNEXT routine. Shared executables to the rescue! One must create a shared executable (if necessary, tutoring the users so they can do it for themselves) containing a dummy QNEXT routine, and allow the user the option of $LINK/EXE=user_qnext.exe user_qnext/SHAREABLE $DEFINE QNEXT_IMAGE disk:[userdir]user_qnext.exe $LINK program,QNEXTE_IMAGE_OPTION/OPTION where the QNEXTE_IMAGE_OPTION file contains QNEXTE_IMAGE/SHARE,- QNEXT_IMAGE/SHARE . . .
CHAA006@vaxb.rhbnc.ac.UK (06/02/88)
A shareable image cannot, so far as I know, reference a user-supplied routine directly; the solution is to use Lib$Find_Image_Symbol, which will defer resolution of the image-name until run-time. ** Phil.