answersLogoWhite

0

How does A C work?

User Avatar

Anonymous

11y ago
Updated: 10/21/2022

The C compiler works by converting individual translation units into corresponding object code files. The compiler can only process one translation unit at a time however the object files will contain all the information required by the linker to produce an executable. The compiler only needs to perform one complete compilation of all the translation units. After that, only those translation units that have been modified since the last compilation need be re-compiled (assuming the object files are still in place).

An object file is essentially the machine code representation of the corresponding translation unit, however memory offsets are symbolised. Some of these symbols will have internal linkage (relative to the object code) while others will have external linkage (relative to the executable). It is the job of the linker to examine the symbol tables produced by the compiler and to replace the symbolic offsets with actual offsets.

User Avatar

Nash Towne

Lvl 10
2y ago

What else can I help you with?