3.1. Linking background

Before looking at dynamic linking it is important that basic linker terminology and behavior is understood. A dynamic linker performs a number of similar operations to a static linker. Therefore, the first thing covered in this application note is some basic information on what a linker does and how it does it.

At a high level a linker takes a number of objects files, normally produced by a compiler or assembler, and combines them into an executable file. Some of the object files included in the image might be stored in libraries.

Figure 3.1. Linking process

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.

The linker also needs information on the memory layout for the executable image. This can be provided in a number of ways, including linker command-line options, memory (scatter-loading) description files or default values within the linker.

The linker is responsible for locating individual parts of the object files in the executable image, ensuring that all the required code and data is available to the image and any addresses required are handled correctly.

Copyright © 2010 ARM. All rights reserved.ARM DAI 0242A