Browse Prior Art Database

Dynamic Binding of Executables at Run Time on the Ibm Rt-Pc

IP.com Disclosure Number: IPCOM000035295D
Original Publication Date: 1989-Jul-01
Included in the Prior Art Database: 2005-Jan-28
Document File: 2 page(s) / 15K

Publishing Venue

IBM

Related People

Chang, A: AUTHOR [+5]

Abstract

Two types of executable files exist. The first are considered command text or shell scripts and are interpreted by another program. These files contain ASCII text. The statements within these programs are of the command line syntax and not a high-level language or assembler code. The command line syntax uses the utilities and functions provided by system programs. The other type of executable files are those files whose ordered bits were generated by a compiler or assembler from an ASCII text file and run through another utility called the binder or link editor. It is this second type of executable file that is discussed here. The current binders will not generate an output file that is executable unless every symbol referenced from within the program has been resolved.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 48% of the total text.

Page 1 of 2

Dynamic Binding of Executables at Run Time on the Ibm Rt-Pc

Two types of executable files exist. The first are considered command text or shell scripts and are interpreted by another program. These files contain ASCII text. The statements within these programs are of the command line syntax and not a high-level language or assembler code. The command line syntax uses the utilities and functions provided by system programs. The other type of executable files are those files whose ordered bits were generated by a compiler or assembler from an ASCII text file and run through another utility called the binder or link editor. It is this second type of executable file that is discussed here. The current binders will not generate an output file that is executable unless every symbol referenced from within the program has been resolved.

A symbol is defined as any object within a program that may be acted upon. Each symbol has associated with it a data structure which identifies the symbol and locates the symbol at a specific offset in the file. This offset is used to reference the symbol during the execution of the program by the operating system. Each separate procedure within a program has an associated symbol,
i.e., data structure, as do routines called from within the program that are located physically in some other file. When a program is compiled or assembled, every symbol not found within the bounds of the program, is marked as external. All external references must be resolved to the proper symbol during what is termed the link edit phase. If not all symbols are thus resolved, an error will occur in the link edit phase and the program is not executable.

Not all the symbols used by a program need to be supplied by the program. There are special files which are called system libraries. These libraries contain common routines which can be used by any program. The libraries provide basic system functions. The libraries themselves are groups of object modules. Object modules are the output from compilers that have not gone through the link edit phase and are, therefore, not executable. In general, when a program, during link edit, requires a symbol defined in a library, the object module containing the symbol is copied to the file being created by the link editor. Thus, the symbol is resolved by making the symbol part of the physical unit of the executable file.

Shared libraries are an exception to this generality. Instead of the entire object module in which the symbol is found being copied, the definition of the symbol found is resolved in the link editor's output, along with the entire data area of the object module. In this way, the libraries code section is shared, i.e., one copy, by all programs that have linked to the library. This code section is pure and has no symbols that require relocating. The symbol is resolved to a location external to the file but to a known location. Shared libraries are a way to factor out all the co...