Object Code Forms in Compilation
Object Code Forms in Compilation
In the final phase of a compiler, the intermediate representation of the source program is translated
into object code — a low-level form of code that can be executed by a computer. The form of object
code generated depends on the compiler design, the target system, and the way the compiled code
is expected to be used. There are three major forms in which object code can be generated:
Absolute machine code is a fully-resolved and directly executable form of machine code. All the
addresses of instructions and data are hardcoded and fixed during compilation. Once generated, this
code can be loaded at a specific memory location and run without any further processing such as
linking or relocation.
This form of object code is simple and fast, making it suitable for small, standalone applications or
educational tools like WATFIV or PL/C.
Advantages:
Limitations:
• Lack of flexibility — the program must always be loaded at the same memory address.
This form is widely used in modern software development, where large applications are developed in
a modular way and recompiled in parts.
Advantages:
Requirements:
• May also require a loader to load the linked program into memory.
Assembly language code is a human-readable, symbolic version of machine code. It uses instructions
like MOV, ADD, and symbolic labels like LOOP: instead of binary codes. Assembly code must be
passed through an assembler to produce machine-level object code.
This form is useful for system-level programming, performance tuning, or debugging, where visibility
and control over hardware-level operations are necessary.
Advantages:
Limitations:
Executable Linking
Code Form Readable Typical Use Case
Directly Required
System/embedded
Assembly Code Yes No Yes (after ASM)
programming
Conclusion
Each form of object code has its own role and relevance depending on the goals of the compiler and
the application domain. Absolute machine code is best for fast, single-shot compilation and
execution. Relocatable object code supports modern development workflows involving modularity
and dynamic linking. Assembly language offers clarity and low-level control, crucial for system and
embedded development. Understanding these forms helps in designing efficient, flexible, and
maintainable compiler architectures.