The error was due to the target not having an RLD entry. At Jim Mulder's suggestion, I created an ENTRY statement for the target instruction in the CSECT and an EXTRN in the file with the relative-branch. (When I mentioned a "relative-branch instruction", I meant any of the relative-branch instructions, not specifically J instead of JLU.) Now the JLU assembles fine, and the binder resolves the displacement. The binder doesn't know that the module will be loaded at location 0, but I do, so no more relocation is necessary, as would be required if it was loaded somewhere else.
Yes, the target is an instruction. It's simply a stub that branches to another location, not a full routine. - mb > From: Tony Harminc <[email protected]> > To: [email protected] > Date: 12/16/2015 05:45 PM > Subject: Re: Reltive branches to outside a control section > Sent by: IBM Mainframe Assembler List <[email protected]> > > On 16 December 2015 at 11:55, Mark Boonie <[email protected]> wrote: > > Is it possible to branch to a location in low storage (say, > location x'1234') using a relative-branch instruction where the > target is a symbol defined in a DSECT for which a USING is > established at location 0? If so, I can't seem to discover the > proper incantation. Any ideas? Thanks. > > Generally it's not possible for a couple of reasons. First, because > it's unlikely that your program, i.e. your relative-branch > instruction, will be loaded within relative-branch range of low > storage. This is +-64kB for 16-bit displacement branch (BRC). But for > long displacement branch (BRCL), this is unlikely to be a problem > (+-4GB range). > > So second, the assembler and Binder have no knowledge of where your > program will be loaded at run time. While it is possible to generate a > relative-branch relocation entry in the ESD, I'm not aware of any > facility to have the Binder and IEWFETCH resolve this offset to a > fixed low-storage address at run time. But it is conceptually > possible, and there may indeed be such an incantation. (I see from a > later update that you are running on TPF. I know nothing about Binding > on that OS, but I have strong doubts that it supports this kind of > binding and program loading any more than z/OS.) > > It must surely be rare to have a routine itself at a fixed, > low-storage location above the X'1000' mark. You're sure it's not the > address of a routine? There are any number of simple two instruction > sequences that can accomplish what you want, but they would use a > "normal" base-displacement branch. > > Tony H. >
