Contained WithinFind More DocumentationFeatured Support Resources | PDF로 이 문서 다운로드 (599 KB)
Chapter 1 IntroductionOverviewThis manual describes the operations of the The main areas this manual expands upon are:
These areas, although separable into individual topics, have a great deal of overlap. While explaining each area, this document brings together the connecting principles and designs. Link-EditingLink-editing takes a variety of input files, from cc(1), as(1) or ld(1), and concatenates and interprets the data within these input files to form a single output file. Although the link-editor provides numerous options, the output file produced is one of four basic types:
These output files, and the key link-editor options used to create them, are shown in Figure 1-1. Dynamic executables and shared objects, are often referred to jointly as dynamic objects, and are the main focus of this document. Figure 1-1 Static or Dynamic Link-editing
Runtime LinkingRuntime linking involves the binding of objects, usually generated from one or more previous link-edits, to generate a runable process. During the generation of these objects by the link-editor, the binding requirements are verified and appropriate bookkeeping information is added to each object to allow the runtime linker to map, relocate, and complete the binding process. During the execution of the process, the facilities of the runtime linker are also made available and can be used to extend the process' address space by adding additional shared objects on demand. The two most common components involved in runtime linking are dynamic executables and shared objects. Dynamic ExecutablesDynamic executables are applications that are executed under the control of a runtime linker. These applications usually have dependencies in the form of shared objects, which are located and bound by the runtime linker to create a runable process. Dynamic executables are the default output file generated by the link-editor. Shared ObjectsShared objects provide the key building block to a dynamically linked system. Basically, a shared object is similar to a dynamic executable, however shared objects have not yet been assigned a virtual address. Dynamic executables usually have dependencies on one or more shared objects. That is, the shared object(s) must be bound to the dynamic executable to produce a runable process. Because shared objects can be used by many applications, aspects of their construction directly affect shareability, versioning and performance. It is useful to distinguish the processing of shared objects by either the link-editor or the runtime linker by referring to the environments in which the shared objects are being used:
Related TopicsDynamic LinkingDynamic linking is a term often used to embrace those portions of the link-editing process that generate dynamic executables and shared objects, together with the runtime linking of these objects to generate a runable process. Dynamic linking allows multiple applications to use the code provided by a shared object by enabling the application to bind to the shared object at runtime. By separating an application from the services of standard libraries, dynamic
linking also increases the portability and extensibility of an application. This separation
between the interface of a service and its implementation enables the system to evolve while maintaining application stability,
and is a crucial factor in providing an application binary interface
(ABI). Dynamic linking is the preferred compilation method for Application Binary InterfacesTo enable the asynchronous evolution of system and application components, binary
interfaces between these facilities are defined. The The System V Application Binary Interface, or ABI, defines a system interface for compiled application programs. Its purpose
is to document a standard binary interface for application programs on systems that
implement the System V Interface Definition, Third Edition. Many of the topics covered in the following chapters are influenced by the ABI. For more detailed information see the appropriate ABI manuals. Support ToolsTogether with the objects mentioned in the previous sections come several support tools and libraries. These tools provide for the analysis and inspection of these objects and the linking processes. Among these tools are: nm(1), dump(1), ldd(1), pvs(1), elf(3E), and a linker debugging support library. Throughout this document many discussions are augmented with examples of these tools use. New FeaturesThis section gives an overview of new features and/or updates to this document
that are available with the
|