Definitions

The definitions shown in Table B-1 are very useful in understanding the technical details of the linking and loading process on AIX.

Table B-1. Definitions of terms regarding linking and loading process on AIX
TermDescription
Object fileA generic term for a file containing executable code, data, relocation information, a symbol table, and other information. Object files on AIX for POWER processor architecture are defined by XCOFF (eXtended Common Object File Format). Please refer to the AIX 5L Version 5.2 Files Reference for further information about the XCOFF format.
CSECTThe atomic unit of relocation as far as link-editing is concerned. A CSECT can contain code or data. One CSECT can contain references to other CSECTs. These references are described by relocation entries (RLDs) contained in a section of an object file.
ModuleThe smallest, separately loadable and relocatable unit. A module is an object file containing a loader section. Modules are loaded implicitly when they are dependents of another loaded module. A module may have an entry point and may export a set of symbols.
Dependent moduleA module loaded automatically as part of the process of loading another module. A module is loaded automatically if it is listed in the loader section of another module being loaded.
ExecutableA module with an entry point. An executable may have exported symbols.
LinkerThe application program that combines multiple object modules into an executable program. On AIX, the ld command is the system linker. The ld command processes command line arguments and generates a list of commands, which are piped to another program called the binder (/usr/ccs/bin/bind). For the purpose of this document, the terms linker and binder are used interchangeably.
System loaderA kernel subsystem that creates a process image from an executable file. The loader loads the executable file into memory, loads (or finds) the program’s dependent modules, looks up imported symbols, and relocates references.
Load-timeThe time period during which the system loads a module and its dependents. This includes the processing required to resolve symbols and relocate the modules. A module can be loaded with the exec(), dlopen(), or load() system calls. The dlopen() and loadAndlnit() functions are higher level calls that ultimately call load().
Exec-timeExec-time is load-time for the main program. A new program is loaded when the exec() function is called.
Run timeRun time starts when the control enters main() and ends when the program exits.
ResolutionThe act of associating a reference to a symbol, with the definition of that symbol. Symbol resolution is performed by the linker at link-time and by the system loader at load-time. Some special kinds of symbol resolution can occur during run time.
ArchivesArchive files are composite objects that usually contain object files. On AIX, archives can contain shared objects, import files, or other kinds of members. By convention, the name of an archive usually ends with .a, but the magic number of a file (that is, the first few bytes of the file) is used to determine whether a file is an archive or not.
LibraryA library is a file that contain the definitions of multiple symbols.
Export and Import listsImport files are ASCII files that list symbols to be resolved at load-time, and often times, their defining modules. This information is saved in the loader section of the generated module, and is used by the system loader when the module is loaded. The import file can be used in place of a corresponding shared object as an input file to the ld command. Export files are ASCII files that list global symbols to be made available for another module to import. The file formats of the import and export file are the same.
StripA system command that reduces the size of an XCOFF module by removing the linking and debugging information. Object files that have been stripped cannot be used as input to the linker. A module that has been stripped can still be loaded, since the module’s loader section contains the information needed to load the module.
Static linkingExecuting the ld command so that shared objects are treated as ordinary (non shared) object files. A shared object that has been stripped cannot be linked statically.
load() callThe load() system call can be used to add a module into a running process, allowing a program to expand its own capabilities. The unload() system call can be used to remove object modules from an executing program, which were loaded with the load() routine.
loadbind() callA system call that allows deferred references to be resolved after a module has been loaded.
Dynamic bindingThe technique where imported symbols are looked up or resolved at load-time or run time.
Run-time linkingThe technique where imported symbols are resolved at load-time. When run-time linking is used, symbols may resolve to alternate definitions that were not available at link-time.
Dynamic loadingThe addition of modules to a running (executing) process. Modules can be loaded with the load(), dlopen(), or loadAndlnit() functions.
Lazy loadingThe ability to defer loading of a dependent module until a function in the dependent module is first called by the process.
RebindingAssociating an alternate definition with an imported symbol at run time. By default, the linker identifies a specific dependent module with each imported symbol. When the run-time linker is used, the imported symbol can be associated with a symbol in a different module.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset