2.2.4. Linker placement rules

The linker observes a set of rules, shown in Figure 2.4, to decide where in memory code and data is located.

Figure 2.4. Linker placement rules

The image is organized first of all by attribute, with RO at the lowest memory address, then RW, then ZI. Within each attribute code precedes the data.

From there, the linker places input sections alphabetically by name. Input section names correspond with assembler AREA directives.

In input sections, code and data from individual objects are placed according to the order of object files given on the linker command line.

ARM does not recommend relying on these rules for precise placement of code and data. Instead, you must use the scatter-loading mechanism for full control of placement of code and data. See Tailoring the image memory map to your target hardware.


See RealView Compilation Tools v3.0 Linker and Utilities Guide for more information on placement rules and scatter-loading.

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0203G