I was avoiding wading into this conversation because I'm not quite sure how the
binder actually works but something I did want to point out is that entry
points in different CSECTs (as shown by the ALIASES below) CAN have different
AMODEs.
For example, running an AMBLIST against a load module I maintain:
MEMBER NAME: xxxxxx01 MAIN ENTRY POINT: 00000000
LIBRARY: LIBIN AMODE OF MAIN ENTRY POINT: 31
** ALIASES ** ENTRY POINT AMODE
xxxxxx02 00xxxxx0 31
xxxxxx03 00xxxxx0 64
xxxxxx04 00xxxxx0 31
Eric Rossman
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Jon
Perryman
Sent: Sunday, October 22, 2023 4:00 PM
To: [email protected]
Subject: [EXTERNAL] Re: AMODE was: Why do all entry points have to be in the
same class?
On Sun, 22 Oct 2023 14:55:20 +0000, Peter Relson <[email protected]> wrote:
>>Jon P wrote
>> Mixed AMODE load modules is a bad thing and very rarely needed.
>
>I disagree. It's not a "bad thing". There's nothing wrong with switching
>AMODE when needed.
AMODE switching is not being discussed. The OP is complaining about IBM's
choice of having 1 and only 1 AMODE when binding a single load module. He
thinks it makes more sense to have a unique AMODE for each ALIAS.
The bad thing I'm referring to is having AMODE 24 csects included in a load
module linked AMODE 31. You always link a module to it's lowest csect AMODE.
> it might well have to switch out of AMODE 64 to call something.
Switching AMODEs is essential and I would never say it's bad. To the contrary,
I've written programs using AMODE switching. For this discussion, we are
discussing the AMODE that is used when a program starts.
>> I don't think that AMODE 24 in assembler does anything more useful
>> than tell the binder the program must be linked AMODE 24 (not 31/64)
>It does two things that come to mind:
AMODE specified in the assembler source does not affect the assembly. The value
is passed to the binder whereas you say, is used to set the default load module
AMODE however technically the binder simply validates AMODE compatibility and
that all CSECTs are compatible with the load module AMODE.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN