Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Inter-Program Binding

IP.com Disclosure Number: IPCOM000114412D
Original Publication Date: 1994-Dec-01
Included in the Prior Art Database: 2005-Mar-28
Document File: 6 page(s) / 191K

Publishing Venue

IBM

Related People

Hicks, DR: AUTHOR [+3]

Abstract

An enhanced method for dynamic linking is disclosed. This method makes uses of interface signatures and an import-by-ordinal mechanism. Interface signatures can be used by an Application Programming Interface (API) provider to maintain release-to-release compatibility between the API and client programs. The import-by-ordinal mechanism speeds program activation (loading) substituting a table lookup for more expensive symbolic resolution mechanisms.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 31% of the total text.

Inter-Program Binding

      An enhanced method for dynamic linking is disclosed.  This
method makes uses of interface signatures and an import-by-ordinal
mechanism.  Interface signatures can be used by an Application
Programming Interface (API) provider to maintain release-to-release
compatibility between the API and client programs.  The
import-by-ordinal mechanism speeds program activation (loading)
substituting a table lookup for more expensive symbolic resolution
mechanisms.

FIG.  1 - The program exports 4 symbols: CLOSE, OPEN, READ, and
WRITE, with export IDs of 2, 1, 3, and 4 respectively.  A "P"  in the
External Address Table  denotes a procedure symbol.  The current
interface signature is the first entry in the Signature Table

      The OS/400* system supports two forms of executable programs
known as program objects  (*PGM) and service program objects
(*SRVPGM.)  A *PGM  object can be invoked from the command line at
it's program entry point.  A service program exports external symbols
to which other executable programs may be bound.  A *SRVPGM  cannot
be called from the command line; a *PGM  does not export external
symbols.
  STRPGMEXP PGMLVL(*CURRENT)
    EXPORT SYMBOL(OPEN)
    EXPORT SYMBOL(CLOSE)
    EXPORT SYMBOL(READ)
    EXPORT SYMBOL(WRITE)
  ENDPGMEXP

FIG.  2 - The symbols exported by the hypothetical program
USERLIB/IOFUNC are OPEN, CLOSE, READ and WRITE.  Export IDs assigned
by the binder are 1, 2, 3, and 4 respectively.

      An executable program which is bound to a service program is
referred to as a client of that service program.  A service program
is functionally similar to a shared object file or dynamic link
library found on other systems.  The OS/400 terms for linking and
loading are binding and activating, respectively.

The service program contains three structures which are used during
program binding (Fig. 1):
  o  External Symbol Table
  o  Signature Table
  o  External Address Table

      The External Symbol Table  specifies the symbols which are
exported by the service program.  Each entry maps a symbolic name
into an ordinal, the export ID.  The system binder reads the External
Symbol Tables of all service programs supplied as input when binding
a new executable program.  When the binder resolves a reference to a
symbol exported by a service program it records three pieces of
information in the new executable program:  the symbolic name of the
exporting service program, the current interface signature of the
service program, and the export ID of the symbol.  This information
is recorded in the Service Program Table and Import Table  of the
client program.

      The External Address Table  contains the virtual address of
each exported symbol at run-time.  Table entries are indexed by
export ID.  The table is initialized with the symbol's virtual
address when the service program is activated.  Each entry also holds
the type (procedur...