Binder Manual (G06.24+, H06.03+)
Binder Manual—528613-003
6-1
6 User Libraries
This section contains the following topics:
A user library is a set of procedures that the operating system can link to a program file
at run time. This section contains general information needed for effective
programming with user libraries.
User libraries are available in TAL and FORTRAN and D-series C and COBOL85
programs. User libraries are not available in Pascal.
User libraries provide many benefits to programs. You can place commonly used
procedures in a user library:
•
To reduce the storage required for object code on disk and in main memory.
•
To share a set of common procedures among applications.
•
To extend a single application’s code space.
Binding User-Library Procedures
The first time you execute a program file after compilation, the system searches the
optional user library to resolve each unresolved external reference before searching
the system code and library.
The HP NonStop Operating System resolves an external reference by changing the
call in the program file appropriately; that is, to point to the user library or to the system
library. You can then run the program file repeatedly without satisfying the references
again.
If the operating system cannot find a user or system library procedure to satisfy a run-
time external reference, it displays a message as the process starts. When the process
makes a call to an unresolved procedure, the process changes the reference into a call
to the Debug utility, and the process enters the debug state.
Run-time binding does not include copying the procedure into the program file. A
program file can have only one user library associated with it. Therefore, on a TNS
system, a running program can have 16 segments of program code space and 16
segments of library code space for a total of 32 segments. On a TNS/R system, a
running program can have 32 segments of program code space and 32 segments of
Topic Page
Binding User-Library Procedures
6-1
Object File Format 6-2
Preventing Binder Resolution of Library Calls 6-2
Specifying a User Library 6-3
Restrictions on User Libraries 6-3
Shared Run-Time Libraries 6-4