Pascal which provides a small set of standard

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e in yet another section. To build the executable, the linker must perform two main tasks: 352 main.c Translators (cpp, cc1, as) main.o Linker (ld) p swap.c Translators (cpp, cc1, as) swap.o CHAPTER 7. LINKING source files relocatable object files fully linked executable object file Figure 7.2: Static linking. The linker combines relocatable object files to form an executable object file p. ¯ ¯ Symbol resolution. Object files define and reference symbols. The purpose of symbol resolution is to associate each symbol reference with exactly one symbol definition. Relocation. Compilers and assemblers generate code and data sections that start at address zero. The linker relocates these sections by associating a memory location with each symbol definition, and then modifying all of the references to those symbols so that they point to this memory location. The following sections describe these tasks in more detail. As you read, keep in mind the basic facts of linkers: Object files are merely collections of blocks of bytes. Some of these blocks contain program code, others...
View Full Document

Ask a homework question - tutors are online