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

Binder Manual528613-003
4-1
4 Object File Structure
This section discusses object file structure, including:
All Binder operations are performed on object files. The following discussions pertain to
object file structure both for input files and target files.
Code Blocks, Entry Points, and Data Blocks
Code blocks and data blocks are the smallest independently located pieces of a
program. Code blocks contain executable machine instructions, as well as some inline
constant data. Data blocks contain only data.
Code blocks are all located in the read-only code segments of the program’s user code
space or the user library space. There can be 1 to 32 code segments, each containing
up to 64K 16-bit words of code. Binder automatically determines where to put code
blocks within the minimum number of segments, unless you manually override this
determination with Binder commands.
Because code and library spaces are entirely read only, they are automatically
shareable among all processes concurrently executing an object code file. In contrast,
each process has its own private copy of the program’s data space. The name,
visibility, size, contents, and internal layout of a block are determined at compile time.
A block’s location in memory is determined at bind time. Each block’s location in
memory is independent of the locations assigned to other blocks. A major function of
binding is to fix up or relocate all address references from one block to another after
the locations of all blocks are known.
Code Blocks
A code block contains the executable machine code for a routine that is invoked
through a procedure call (PCAL) or an external call (XCAL) instruction and the
procedure entry point (PEP) table.
Code Block Names
The name of the code block is the same as that of the routine it contains. Thus, a code
block can be a COBOL85 compilation unit; a Pascal main program, procedure, or
function; a TAL PROC; a FORTRAN main program, subroutine, or function; or a C
function. The name given to an unnamed FORTRAN main program is MAIN^. For
more information on PCAL and XCAL instructions, see the appropriate description
manual for your system.
Topic Page
Code Blocks, Entry Points, and Data Blocks
4-1
Object File Format 4-8