What are linkage editor and linker? Easy-to-understand explanation of basic programming concepts

Explanation of IT Terms

What are Linkage Editor and Linker? Easy-to-understand explanation of basic programming concepts

Programming languages play a crucial role in the development of software. However, the code written in these languages needs to go through several stages before it can be executed by a computer. Two essential processes in this journey are the Linkage Editor and the Linker. In this blog post, we will explore the concepts and functionalities of these two tools, aiming to provide a comprehensive and straightforward explanation.

Linkage Editor

A Linkage Editor, also known as a Binder, is a program that combines the object modules generated by a compiler into a single executable program or a library. Object modules are the result of compiling individual source code files, and they contain machine-level instructions.

The Linkage Editor plays a crucial role in resolving external references or symbols used by separate modules. External references occur when a module references a variable or a function that is defined in another module. The Linkage Editor resolves these references by ensuring that each reference is correctly connected to its corresponding definition.

Additionally, the Linkage Editor performs various operations such as relocating addresses, allocating memory, and updating symbol tables. These tasks are essential for creating a coherent and executable program.

Linker

The Linker, also referred to as a Linkage Loader, is a program that combines object modules produced by the Linkage Editor with other necessary libraries to create a fully functional and executable program. It performs the final linking phase, resolving any remaining references or symbols.

The Linker has the responsibility of resolving both internal and external references. Internal references occur when different parts of the same module reference each other, while external references involve references to functions or variables in other modules.

During the linking process, the Linker performs tasks like creating a unified address space, fixing relative addresses, and updating the program’s symbol table. It also handles any necessary memory allocations and relocations, ensuring that the program can be loaded and executed without any conflicts.

Conclusion

In summary, the Linkage Editor and Linker are essential components in the software development process. The Linkage Editor combines individual object modules, resolving external references and performing various necessary operations. The output of the Linkage Editor is then passed to the Linker, which combines it with other libraries, resolves remaining references, and prepares the program for execution.

Understanding the functionalities of the Linkage Editor and Linker is fundamental for programmers, as it enables them to create complex and functional software systems. By grasping these concepts, developers can ensure that their programs are properly linked and can be executed seamlessly.

Reference Articles

Reference Articles

Read also

[Google Chrome] The definitive solution for right-click translations that no longer come up.