The binder can handle the relocation without a problem. If you have any doubt 
about it, then change OFFSET to use AL2 instead of A.

Having the LHI fail with the external reference is a good thing. I personally 
think that BRC with an external label should also be flagged as an error (at 
the very minimum a warning). Halfwords have a range from -32767 to 32767. 
Everything works fine until one day a re-link causes these limits to be 
exceeded causing you to add ORDER statements or modify the programs to remove 
these. 

LARL allows 16M relative addressability so it is fine.

You really need to ask yourself when we've gone to far in making it easy for 
newbies to easily shoot themselves in the foot.

Jon Perryman.



>________________________________
> From: Bob Raicer <[email protected]>
>
>
>Here is an example of what I was trying to describe:
>
>ABLE     CSECT ,
>         EXTRN IEFBR14
>
>         USING ABLE,R7
>         LARL  R15,IEFBR14
>         BRC   0,IEFBR14
>         LHI   R15,(IEFBR14-ABLE)
>         LHI   R15,(SECOND-FIRST)
>
>
>OFFSET   DC    A(IEFBR14-ABLE)
>FIRST    DC    F'1'
>SECOND   DC    F'3'
>
>
>And here are some snippets from the assembly listing:
>
>00000000 C0F0 0000 0000          00000000     22          LARL R15,IEFBR14
>00000006 A704 0000               00000000     23          BRC 0,IEFBR14
>0000000A 0000 0000               00000000     24          LHI 
>R15,(IEFBR14-ABLE)
>** ASMA032E Relocatable value or unresolved symbol found when absolute value 
>required -
>(IEFBR14-ABLE)
>** ASMA435I Record 24 in RAICER.TEMP.SOURCE(SIMPLE) on volume: DV2D19
>0000000E A7F8 0004               00000004     25          LHI 
>R15,(SECOND-FIRST)
>
>00000024 00000000                             30 OFFSET   DC A(IEFBR14-ABLE)
>00000028 00000001                             31 FIRST    DC F'1'
>0000002C 00000003                             32 SECOND   DC F'3'
>
>
>                                                Relocation Dictionary
>  Pos.Id   Rel.Id   Address  Type  Action
>00000004 00000006 00000002  RI 4     +
>00000004 00000006 00000008  RI 2     +
>00000004 00000004 00000024   A 4     -
>00000004 00000006 00000024   A 4     +
>
>
>Statements 22 and 23 cause entries to be placed in the Relocation
>Dictionary which indicate the Relocation Type is Relative Immediate
>and the size (in bytes) of the corresponding item to be adjusted by
>the relocation processing is four and two, respectively.
>
>For statement 24, entries in the Relocation Dictionary would be
>required in order to compute the Absolute Value of the expression
>during relocation processing, much like the RLD entries necessary to
>resolve the same expression for statement 30.
>
>And, yes, binder support is required for this, much like the binder
>support needed to handle the RLD items for statements 22 and 23.
>
>Bob
>
>
>

Reply via email to