I'm presently looking at the load modules belonging to a system with a
lot of PL/I, all compiled with V2.3 of the PL/I Optimising Compiler.
Mainly I'm able to identify these modules fairly well, but I've run into
a few with a nasty (from my point of view) quirk I've not seen before.

I should point out that I load the modules into main storage (by
emulating the loader) and then "look" into the resulting storage. 

Anyway, in these modules, the main entry point is CSECT PLISTART. CSECT
PLISTART offset x'2C' points to CSECT PLIMAIN. In most cases I've seen,
PLIMAIN offset zero points to the "true" entry point for the compiled
code. But in these few, PLIMAIN offset 0 points to PLIMAIN offset 4. It's
a valid address, and holds an STM instruction (X'90') - so it's odds-on
that this is by design!

Does anyone know what this stay-in-PLIMAIN structure signifies, and how I
can usefully identify which piece of code *really* gets control at run
time using a reasonably simple analysis? I use this information to go
from the entry point to the user CSECT that gets control at run time, so
I can pick up the product code from the appropriate IDR record, and do
some other checks as well. As I'm just getting a starting-CSECT answer of
"PLIMAIN" at the moment, I'm coming up with a language of "Assembler H",
which is right for PLIMAIN, and flat wrong for the user program. While I
could "cheat" and look for the PLI entry points (say ABC1 for module ABC),
it's very much a brute-force-and-pig-ignorance method and I'd very much
like to do the job as nicely as I can :-) 

Any help (including pointers to any relevant documentation, which seems
pretty thin on the ground - did the V2.3 documentation make it into
softcopy?) would be very gratefully received!

Many thanks in advance,    

Pete.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to