Keil™, An ARM® Company

RealView Linker and Utilities Guide

Building blocks for objects and images

3.1.1. Building blocks for objects and images

An executable file is constructed from a hierarchy of images, regions, output sections, and input sections:

  • An image consists of one or more regions. Each region consists of one or more output sections.

  • Each output section contains one or more input sections.

  • Input sections are the code and data information in an object file.

Figure 3.1 shows the relationship between regions, output sections, and input sections.

Figure 3.1. Building blocks for an image

Figure 3.1 shows the building blocks that make up the image:

Input sections

An input section contains code or initialized data, or describes a fragment of memory that is not initialized or that must be set to zero before the image can execute. These properties are represented by attributes such as RO, RW and ZI. See Ordering input sections by attribute for more information. These attributes are used by armlink to group input sections into bigger building blocks called output sections and regions.

Output sections

An output section is a contiguous sequence of input sections that have the same RO, RW, or ZI attribute. An output section has the same attributes as its constituent input sections. Within an output section, the input sections are sorted according to the rules described in Section placement.

Regions

A region is a contiguous sequence of one, two, or three output sections. The output sections in a region are sorted according to their attributes. The RO output section is first, then the RW output section, and finally the ZI output section. A region typically maps onto a physical memory device, such as ROM, RAM, or peripheral.

Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0377A