Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bu-cs!purdue!decwrl!labrea!agate!ucbvax!uwastm.phys.washington.EDU!WHIT From: WHIT@uwastm.phys.washington.EDU ("John Whitmore, III ") Newsgroups: comp.os.vms Subject: Shareable image ... Message-ID: <8805230943.AA14644@ucbvax.Berkeley.EDU> Date: 18 May 88 01:38:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 40 >From: Rudolph Shally >To: Richard Seymour >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 . . .