2.4.1. Scatter-loading

Scatter-loading enables you to describe the load-time and runtime location of code and data in memory in a textual description file known as a scatter-loading description file. The file is passed to the linker on the command line using the --scatter option. For example:


armlink --scatter scat.txt file1.o file2.o

The scatter-loading description file describes to the linker the desired location of code and data at both load-time and runtime, in terms of addressed memory regions.

Scatter-loading regions

Scatter-loading regions fall into two categories:

  • Load Regions that contain application code and data at reset and load-time.

  • Execution Regions that contain code and data while the application is executing. One or more execution regions are created from each load region during application startup.

All code and data in the image falls into exactly one load region and one execution region.

During startup, C library initialization code in __main carries out the copying and zeroing of code and data necessary to move from the image load view to the execute view.

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