| |||
| Home > Using the Basic Linker Functionality > Specifying the image structure > Building blocks for objects and images | |||
An image, as stored in 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.
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. Input sections can have the attributes RO, RW, or ZI. These three attributes are used by armlink to group input sections into bigger building blocks called output sections and regions.
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.
A region is a contiguous sequence of one to 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.