> Which, BTW, is not as easy as it sounds. Consider, for example, DC A(FOO-BAR) where FOO and BAR are in different CSECTs that may be scatter-loaded.
Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Seymour J Metz Sent: Monday, August 23, 2021 3:23 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Relocatability (was: Load Library Module Length ...) > If dynamically loaded, read the module to any location with a > channel program. RLDs were resolved by linker. The binder and linkage editor relocate addresses relative to the module. Somebody still has to adjust them relative to where you read in the module. Which, BTW, is not as easy as it sounds. OS/360 and OS/VS1 had SVC transient areas. No adcons were allowed in type 3 and 4 SVC routines. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Paul Gilmartin [0000000433f07816-dmarc-requ...@listserv.ua.edu] Sent: Monday, August 23, 2021 9:22 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Relocatability (was: Load Library Module Length ...) On Mon, 23 Aug 2021 11:54:19 +0000, Seymour J Metz wrote: [Re: <https://secure-web.cisco.com/1LUGiGKrOCO5YgBhHj1lbduJ_JlWU83NOxQUJDpdKXDB-P kOXDQNNottIrLcJ7i9fehwk6ym1gOrw1ylJ12hPQjHDvpRQjubrUSucEm1h-bc3Jms67yOjgbG0G h19ewEhDFhXcajzqYVXlHpvwKpWDLAXnC1HquJTzBLU12t3kB_Ssc-34E0tQp7xNzdIlbwh5pERW pYdzysq4AWyJFD9F-kZv0S6N7K1Fd2Sxwrf896J_JgIw3ekFnVGOuwd8aDALvJhD4WcSqj1rfBYm n2WQrS5UWYMMdiVydN2rMYNTZUJ0axBC-FDHNqrrgJxs7su1TXYfBfTOzLXxmVj06x8PqKbY78Vn YpjyG-DBtQro-Om793V35mT0l92EGIKUP2leUswUq9dkIK_oeoZBci0GiBv21AaAylWsevoukJkQ GTMvaRNWas7L2ofS4DW0SeF/https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FPosition-ind ependent_code>] >How would you handl calls to sepaerately compiled subroutines without RLD? How would you write PIC that called external subroutines? > If statically linked: LA R15,EPTR AL R15,EPTR BALR R14,R15 R15 is available as a code base. ... * Linker will resolve RLDs -- pairing makes the value absolute. EPTR DC A(SUBR-*) This value is position-independent. If dynamically loaded, read the module to any location with a channel program. RLDs were resolved by linker. Place its address in R15 BALR R14,R15 R15 is available as a code base. Some OS (DOS 360?) (CMS?) had a convention of "transient" modules, loadable anywhere, either PIC or containing prologues to modify addresses. I recall FORTRAN II for IBM 700/7000. Each subroutine contained a prologue to replace addresses of formal parameters with addresses of actual parameters. Self-modifying; horribly NORENT. >________________________________________ >From: Paul Gilmartin >Sent: Monday, August 23, 2021 5:29 AM > >On Sun, 22 Aug 2021 17:04:20 -0700, Charles Mills wrote: > >>Not what you asked, but can one MVCL a load module ... >>Of course in some case one might know that the >>load module in question was a table e.g. that had no RLDs. >> >https:[...] > >I was once modifying a [FOSS] Pascal compiler ... -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN