Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mcnc!rti!rcb From: rcb@rti.UUCP (Random) Newsgroups: comp.os.vms Subject: Re: Are Transfer Vectors Truly Useful When Creating Shareable Images? Message-ID: <1562@rti.UUCP> Date: Fri, 17-Jul-87 10:03:21 EDT Article-I.D.: rti.1562 Posted: Fri Jul 17 10:03:21 1987 Date-Received: Sat, 18-Jul-87 13:39:48 EDT References: <2961@blia.BLI.COM> Reply-To: rcb@rti.UUCP (Random) Organization: Research Triangle Institute, NC Lines: 24 In article <2961@blia.BLI.COM> forrest@blia.BLI.COM (Jon Forrest) writes: >For example, let's say that a sharable image contains variable A which >is 10 bytes long and begins at location 100 and variable B which is >20 bytes long and begins at location 110. We can assume both are >universal symbols. The user links an application program that references >both variables with this sharable image. Everything works fine. >Meanwhile, the software developer who sold the user the shareable >image modifies variable A so that it now is 20 bytes long. This >means that variable A begins at 100, as before, but now variable >B now begins at location 120. Then, the user receives this new >shareable image and, much to his consternation, finds that his >program bombs every time he references location B. The solution is really simple. Have a section of code that will always be at a fixed address and will contain pointers to the data structures. The pointers will always be 4 bytes and the addresses won't change. You can change the size of the structure and you could even change it at run time and the program won't care since it always accesses it through the pointer that is in a known location. -- Randy Buckland Research Triangle Institute rcb@rti.rti.org [128.109.139.2] {decvax,ihnp4,seismo}!mcnc!rti-sel!rcb