Accessing program object class information
The initial load segment of a program object can contain a binder-generated
text class that describes the other loadable classes in the program
object. This descriptive class is only present in program objects
stored as COMPAT=PM3 or higher and when one
of the following is true:
- The module has more than one loadable text class.
- There is a loadable text class whose name does not begin with B_.
If COMPAT is specified or defaulted to PM1 or PM2, this descriptive class is suppressed with no error indication. Language Environment-enabled programs that do not use a prelinker step require the IEWBLIT control block.
The information can be accessed in one of the following two ways:
- An
API can be used to retrieve the text from a stored program object.
- The standard binder API or the fast data API can be used.
- The class name is B_LIT and the section name is IEWBLIT.
- An external reference can be used by a program within the object
to locate the text.
- Use the symbol name IEWBLIT.
- It must be a weak reference. For example, a WXTRN in assembler terminology. The binder cannot create the B_LIT class until after all other external symbols have been resolved. A strong reference would be flagged as an error before the class could be created.
The structure contains names, locations, and lengths of each class
in the program object. It also contains the following attribute information
about each class:
- RMODE
- Boundary alignment
- Initial, deferred, or no load
- Read-only status
The structure begins with a header that specifies the number of
class entries and the length of each:
Field Name | Field Type | Offset | Length | Description |
---|---|---|---|---|
BLIT_EYE_CATCHER | Char | 0 | 8 | Constant 'IEWBLIT ' |
BLIT_ LENGTH | Binary | 8 | 4 | Total structure length with entries |
BLIT_VERSION | Binary | 12 | 1 | Structure version = 1 or 2 |
* | 13 | 3 | * reserved * | |
BLIT_HEADER_LENGTH | Binary | 16 | 4 | Length to class entry |
BLIT_CENTRY_LENGTH | Binary | 20 | 4 | Length of one class entry |
BLIT_CENTRY_COUNT | Signed | 24 | 4 | Number of class entries |
BLIT_DEFER_COUNT | Binary | 28 | 4 | Number of class entries |
* | 32 | 8 | * reserved * | |
BLIT_LOADER_TOKEN | Char | 40 | 8 | [For loader use] |
BLIT_CIE_ADDR | Pointer | 48 | 4 | Address of Import/Export table or offset in segment on DASD |
BLIT_MOD_ATTR | Bit | 52 | 4 | Module attributes |
BLIT_XPLINK | Bit | 52.0 | 0.1 | XPLINK linkage convention |
Bit | 52.1 | 0.2 | reserved | |
BLIT_LC_CLASSES | Bit | 52.3 | 0.2 | Indicates if there are loadable C classes
|
* | 56 | 8 | * reserved * |
Each of the class entries has the following format:
Field Name | Field Type | Offset | Length | Description |
---|---|---|---|---|
BLIT_COMMON | Char | 0 | 32 | Common part of both version 1 and version 2 |
BLIT_CLASS_NAME | Char | 0 | 16 | Name of class, blank padded |
BLIT_CLASS_LENGTH | Binary | 16 | 4 | Length of class when loaded |
BLIT_CLASS_ADDR | Pointer | 20 | 4 | Address of initial load class or offset in segment on DASD or zero for deferred load class |
BLIT_RMODE | Binary | 24 | 1 | 00=RMODE_UNSPEC
01=RMODE_24 03=RMODE_ANY 04=RMODE_64 |
BLIT_ALIGN | Binary | 25 | 1 | Power® of 2 class alignment in storage; for example, 3=doubleword aligned (2**3 = 8) |
BLIT_LOAD_ATTR | Bit | 26 | 1 | |
BLIT_RO
|
Bit | 26.0 | 0.1 | Read only if on |
BLIT_NOLOAD
|
Bit | 26.1 | 0.1 | Always off – load classes are not listed in this table |
BLIT_DEFER
|
Bit | 26.2 | 0.1 | Deferred load if on |
BLIT_LANG_ATTR
|
Bit | 27 | 1 | |
BLIT_PADDING
|
Bit | 27.0 | 0.1 | The class has 16-byte initial padding. |
28 | 4 | * reserved * | ||
BLIT_V2_EXT | Char | 32 | 8 | Extension of version 2 |
BLIT_V2_CLASS_ADDR64 | Pointer | 32 | 8 | Address of initial load class or offset in segment on DASD or zero for deferred load class |
BLIT_V2_CLASS_ADDR64_HIGH | Binary | 32 | 4 | High-order word of BLIT_V2_CLASS_ADDR64 |
BLIT_COMMON | Char | 0 | 32 | Common part of both version 1 and version 2 |
BLIT_V2_CLASS_ADDR64_LOW | Binary | 36 | 4 | Low-order word of BLIT_V2_CLASS_ADDR64 |