Path: utzoo!attcan!uunet!husc6!uwvax!dogie!uwmcsd1!ig!agate!ucbvax!HGRRUG51.BITNET!ZWARTS From: ZWARTS@HGRRUG51.BITNET Newsgroups: comp.os.vms Subject: Re: shareable-image Message-ID: <8805240218.AA29798@ucbvax.Berkeley.EDU> Date: 19 May 88 09:44:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 40 >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 easiest way to do this is by passing the routine QNEXT as a argument, instead of using it as a global defined routine. However, this solution is not always possible. What I once did was the following: 1) I created a shareable image with only the dummy routine QNEXT (using transfer vectors etc.). 2) I rebuilt the original shareable image by linking it against the dummy QNEXT in the shareable image from step 1). 3) The user links his program, except his QNEXT against both shareable images. 4) I wrote a procedure for the user to create a shareable image with his QNEXT, using exactly the same transfer vectors as in case 1) of the dummy QNEXT. 5) The user defines a logical name so that the image-activator uses the user's QNEXT, not the dummy one. F. Zwarts Phone: (+31)50-633619 Kernfysisch Versneller Instituut Bitnet/Earn: ZWARTS@HGRRUG51 Zernikelaan 25 Surfnet: KVIANA::ZWARTS 9747 AA Groningen Telefax: (+31)50-634003 The Netherlands Telex: 53410 rugro nl