Binder Manual (G06.27+, H06.04+, J06.03+)
Object File Structure
Binder Manualā528613-004
4-10
Code Region
TAL Global Read-Only Arrays
Binder supports the concept of read-only global data arrays. Currently, the only
language that supports global read-only arrays that are visible to Binder is TAL. The
TAL term for read-only arrays is P-relative arrays. The name is derived from the fact
that read-only arrays reside in the code area of the object file rather than the data area.
Although it can be confusing to find data residing in the code area, it makes sense
when you realize that you can both read the data area and write to it, whereas you can
only read the code area. Therefore, read-only data can safely reside in the code area,
where you cannot accidentally overwrite it.
For single-code-segment object files, Binder places these arrays in the code region
immediately following the PEP. For multiple-code-segment object files, Binder places
these arrays with the first code block in each code segment that refers to them. They
can therefore appear in more than one code segment.
If possible, Binder does not allow read-only string arrays to straddle the 32K boundary.
Binder tries to place such an array above or below the boundary to avoid straddling it.
If it cannot fit the array above or below the boundary, Binder places the array across
the boundary and issues a warning message.
If a string P-relative array is below the 32K boundary and a procedure that refers to this
array is above the boundary, Binder issues a warning message.
You can tell which data blocks are read only in the Binder load map by noticing the āCā
that prefixes the base address of the data block. While the base addresses of the read-
only data blocks in the load map are code segment addresses, Binder lists the read-
only blocks either separately or with the regular data blocks. See Figure 2-6 for a
sample listing of a read-only data block.
Using read-only data blocks in Binder commands is straightforward. Binder treats all
read-only data blocks as DATA blocks, not CODE blocks. Thus, if you want to perform
a Binder function on a read-only data block, you need only specify DATA when using a
Binder command that distinguishes between code blocks and data blocks.
Binder specifies the base addresses and limits of read-only data blocks in the load
map just as it does for regular data blocks. In the following example, the values
specified to dump the first ten words of a regular data block and of a read-only data
block are expressed in the same way:
DUMP DATA regular^data 0,10
DUMP DATA read^only^data 0,10
PEP and XEP Tables
The PEP (procedure entry point) and XEP (external entry point) tables are operating
system tables.
The PEP table contains the entry point addresses for each code block in each code
segment. The PEP is in the first page of each code segment.