Re: Relocatability (was: Load Library Module Length ...)

2021-08-27 Thread Peter Relson

Consider, for example, DC A(FOO-BAR) where FOO and BAR are in different
CSECTs that may be scatter-loaded. 


That's a reason not to use the SCTR option unless it is relevant. 
And it is relevant to z/OS only for loading the nucleus.

But the binder does not know your intent.


Do any assembler macros generate inline relocatable address constants 
anymore? 


yes

Peter Relson
z/OS Core Technology Design


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Relocatability (was: Load Library Module Length ...)

2021-08-25 Thread Seymour J Metz
1024 in OS/360; 2048 in OS/VS1.

Yes, IEHIOSUP. I'm pretty sure that only O/C/EOV had WTF tables.

TSO worked just fine on SVS; BTDT,GTTS.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Greg Price [greg.pr...@optusnet.com.au]
Sent: Tuesday, August 24, 2021 11:27 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Relocatability (was: Load Library Module Length ...)

On 8/24/2021 8:23 AM, Seymour J Metz wrote:
> OS/360 and OS/VS1 had SVC transient areas. No adcons were allowed in type 3 
> and 4 SVC routines.

1024-byte storage areas, perhaps?

PGM=IEHIOSUP anyone?

Did I get the name right?
It was for zapping TTRs into SYS1.SVCLIB members whenever the members
were moved such as after a compress, IIRC.

Yep - sure glad I started on MVS and not earlier systems.
Imagine not having TSO (with your own address space) to play on...

:)

Cheers,
Greg

--
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


Re: Relocatability (was: Load Library Module Length ...)

2021-08-25 Thread Seymour J Metz
My recollection is that only O/C/EOV had Where To Go (WTG) tables/. All type 
IV, pretty much by definition.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Joe 
Monk [joemon...@gmail.com]
Sent: Tuesday, August 24, 2021 12:13 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Relocatability (was: Load Library Module Length ...)

IEHIOSUP only applied to Type IV SVCs, IIRC.

Joe

On Tue, Aug 24, 2021 at 10:28 AM Greg Price 
wrote:

> On 8/24/2021 8:23 AM, Seymour J Metz wrote:
> > OS/360 and OS/VS1 had SVC transient areas. No adcons were allowed in
> type 3 and 4 SVC routines.
>
> 1024-byte storage areas, perhaps?
>
> PGM=IEHIOSUP anyone?
>
> Did I get the name right?
> It was for zapping TTRs into SYS1.SVCLIB members whenever the members
> were moved such as after a compress, IIRC.
>
> Yep - sure glad I started on MVS and not earlier systems.
> Imagine not having TSO (with your own address space) to play on...
>
> :)
>
> Cheers,
> Greg
>
> --
> 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


Re: Relocatability (was: Load Library Module Length ...)

2021-08-24 Thread Joe Monk
IEHIOSUP only applied to Type IV SVCs, IIRC.

Joe

On Tue, Aug 24, 2021 at 10:28 AM Greg Price 
wrote:

> On 8/24/2021 8:23 AM, Seymour J Metz wrote:
> > OS/360 and OS/VS1 had SVC transient areas. No adcons were allowed in
> type 3 and 4 SVC routines.
>
> 1024-byte storage areas, perhaps?
>
> PGM=IEHIOSUP anyone?
>
> Did I get the name right?
> It was for zapping TTRs into SYS1.SVCLIB members whenever the members
> were moved such as after a compress, IIRC.
>
> Yep - sure glad I started on MVS and not earlier systems.
> Imagine not having TSO (with your own address space) to play on...
>
> :)
>
> Cheers,
> Greg
>
> --
> 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


Re: Relocatability (was: Load Library Module Length ...)

2021-08-24 Thread Greg Price

On 8/24/2021 8:23 AM, Seymour J Metz wrote:

OS/360 and OS/VS1 had SVC transient areas. No adcons were allowed in type 3 and 
4 SVC routines.


1024-byte storage areas, perhaps?

PGM=IEHIOSUP anyone?

Did I get the name right?
It was for zapping TTRs into SYS1.SVCLIB members whenever the members 
were moved such as after a compress, IIRC.


Yep - sure glad I started on MVS and not earlier systems.
Imagine not having TSO (with your own address space) to play on...

:)

Cheers,
Greg

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Relocatability (was: Load Library Module Length ...)

2021-08-23 Thread Charles Mills
OPEN? (Non-reentrant)

DCB EODAD and EXLST?

I think many of the standard form macros.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Michael Stein
Sent: Monday, August 23, 2021 7:51 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Relocatability (was: Load Library Module Length ...)

On Mon, Aug 23, 2021 at 04:17:19PM -0700, Charles Mills wrote:
> > 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. 

Do any assembler macros generate inline relocatable address constants
anymore?

--
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


Re: Relocatability (was: Load Library Module Length ...)

2021-08-23 Thread Michael Stein
On Mon, Aug 23, 2021 at 04:17:19PM -0700, Charles Mills wrote:
> > 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. 

Do any assembler macros generate inline relocatable address constants anymore?

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Relocatability (was: Load Library Module Length ...)

2021-08-23 Thread Charles Mills
> 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 [000433f07816-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 +, 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
 ALR15,EPTR
 BALR  R14,R15  R15 is available as a code base.
 ...
* Linker will resolve RLDs -- pairing makes the value absolute.
EPTR DCA(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


Re: Relocatability (was: Load Library Module Length ...)

2021-08-23 Thread Seymour J Metz
> 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 [000433f07816-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 +, Seymour J Metz wrote:

[Re: 
]

>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
 ALR15,EPTR
 BALR  R14,R15  R15 is available as a code base.
 ...
* Linker will resolve RLDs -- pairing makes the value absolute.
EPTR DCA(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