Skip to content

MicBrain/Linker

Repository files navigation

Linker

In computer science, a linker or link editor is a computer program that takes one or more object files (which in our project are .out files) generated by a compiler and combines them into a single executable file, library file, or another object file(in our project just a single executable file).

This version of the linker has two main tasks, combining code and relocating symbols. Code from each input file's .text segment is merged together to create an executable. This also determines the absolute address of each symbol (assembler outputs a symbol table containing the relative address of each symbol). Since the absolute address is known, instructions that rely on absolute addressing can have the addresses filled in.

Here is a overview of how the linker functions: