2. Output Interface

The output interface is defined in the output.h file.

It declares four global variables symbol_table, text, data, and bss. These variables represent, respectively, for the symbol table and the text, data, and bss sections that contain both object code and relocation information. All  these data structures should be constructed by the client during the two-pass assembling.

The output interface also provides an output() function. After the symbol table and the sections have been constructed, this function will access them via the four global variables, add other necessary headers and tables,  and produce an object file in the Executable and Linkable Format.

This section describes these data structures and explains how to construct them.

table of content