Binder Manual (G06.24+, H06.03+)

Object File Structure
Binder Manual528613-003
4-6
Data Blocks
Some compilers generate private data blocks to handle the collection of constants and
all private, statically allocated variables used by the compilation unit. For C and Pascal,
these data blocks are private to the module; for COBOL85, and FORTRAN, these data
blocks are private to one routine. Each language uses a different terminology for
private, statically allocated variables:
In C, these are static, nonexternal variables.
In COBOL85, these are nonexternal items in the Working Storage and Extended
Storage sections.
In FORTRAN, these are SAVE variables and variables that appear in DATA
statements but not in common statements.
In Pascal, these are nonexported, nonimported variables declared at the outermost
level.
TAL does not use this kind of data.
The HP NonStop architecture uses four different ways to address statically allocated
data, with different tradeoffs in speed, capacity, or generality. These four ways create
four categories of data blocks:
1. Directly addressable data residing in the first 256 words of the data space,
accessed through small offsets from the G register.
2. Data indirectly accessed through 16-bit G-relative addresses, located anywhere
below the stack, within the first 32K words of the data space.
3. Data indirectly accessed through 32-bit extended addresses, located anywhere
within the data space.
4. P-relative read-only data residing in the local code segment, accessed through the
P register (TAL only).
Each compiler has different strategies for supporting its language through a
combination of these categories of static data.
A single block declaration at the source level can actually produce several data blocks
at the machine level, putting some of the conceptual block’s data into each of the four
categories of storage. Consider the following TAL example:
BLOCK BLK;
INT A;
INT .B;
INT .EXT C;
INT D[0:9];
INT .E[0:99];
INT .EXT F[0:9999];