2.4.4. Placing objects in a scatter-loading description file

For most images, you control the placement of specific code and data sections, rather than grouping all attributes together as in Example 2.2. You can do this by specifying individual objects directly in the description file, instead of relying only on the wildcard syntax.


The ordering of objects in a description file execution region does not affect how they are ordered in the output image. The linker placement rules described in Linker placement rules apply to each execution region.

To override the standard linker placement rules, you can use the +FIRST and +LAST scatter-loading directives. Example 2.3 shows a scatter-loading description file that places the vector table at the beginning of an execution region. In this example, the area Vect in vectors.o is placed at address 0x0000.

Example 2.3. Placing a section

ROM_LOAD 0x0000 0x4000
  ROM_EXEC 0x0000 0x4000
    vectors.o (Vect, +FIRST)
    * (+RO)
  ; more exec regions...

See RealView Compilation Tools v3.0 Linker and Utilities Guide for further information on placing objects in scatter-loading description files.

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