Because it is not "weak" in MODULEA. MODULEA says "I really need TARGET1." The 
fact that it is optional for MODULEB is irrelevant.

It's a WXTRN in MODULEA but an EXTRN in MODULEB. "Weak" is not an attribute of 
an entry point overall; it is an attribute of a reference to an entry point 
from within a particular module.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of David Eisenberg
Sent: Thursday, March 19, 2020 7:43 PM
To: [email protected]
Subject: Binder Cross-Reference table and WXTRN

Hi everyone,

I'm seeing a result in the binder Cross-Reference table that looks odd; I hope 
that someone can help me to understand.

I have two HLASM source modules, MODULEA and MODULEB (as below). Each generates 
an object module.

MODULEA  CSECT
         WXTRN TARGET2
         DC    V(TARGET1)
         DC    V(TARGET2)
         END

MODULEB  CSECT
         WXTRN TARGET1
         DC    V(TARGET1)
         END

I linked these two object modules together (along with no other object 
modules). As expected, neither TARGET1 nor TARGET2 are resolved by the binder. 
But only TARGET1 generates an IEW2456E "unresolved symbol" error message, and 
that much I understand.

In the binder output Cross-Reference table, this is what I see:

-------------  R E F E R E N C E  --------------------------  T A R G E T  -----
CLASS                            ELEMENT       |
OFFSET SECT/PART(ABBREV)          OFFSET  TYPE | SYMBOL(ABBREV)   SECTION 
(ABBREV)
                                               |
     0 MODULEA                         0 V-CON | TARGET1          $UNRESOLVED
     4 MODULEA                         4 V-CON | TARGET2          $UNRESOLVED(W)
    80 MODULEB                         0 V-CON | TARGET1          $UNRESOLVED

What I don't understand is why TARGET1 is not reported as a *weak* unresolved 
reference within MODULEB. In other words, I would have expected the third entry 
in the table above to say $UNRESOLVED(W), because TARGET1 is declared as weak 
in MODULEB.

I really just want to make sure that I'm interpreting what I see correctly. Any 
help would be appreciated; thank you!

David

Reply via email to