Keil™, An ARM® Company

RealView Linker and Utilities Guide

Section-related symbols

4.2.2.  Section-related symbols

The output section symbols shown in Table 4.2 are generated if you use command-line options to create a simple image. A simple image has three output sections (RO, RW, and ZI) that produce the three execution regions. For every input section present in the image, the linker generates the input symbols shown in Table 4.3.

The linker sorts sections within an execution region first by attribute RO, RW, or ZI, then by name. So, for example, all .text sections are placed in one contiguous block. A contiguous block of sections with the same attribute and name is known as a consolidated section.

Output section symbols

If you are using a scatter-loading description file, the output section symbols in Table 4.2 are undefined. If your code accesses these symbols, you must treat it as a weak reference.

The standard implementation of __user_initial_stackheap() uses the value in Image$$ZI$$Limit. Therefore, if you are using a scatter-loading description file you might have to re-implement __user_initial_stackheap() to set the heap and stack boundaries. For more information, see Chapter 5 Using Scatter-loading Description Files.

Table 4.2. Image-related symbols

SymbolSection typeDescription
Image$$RO$$BaseOutput

Address of the start of the RO output section.

Image$$RO$$LimitOutputAddress of the first byte beyond the end of the RO output section.
Image$$RW$$BaseOutputAddress of the start of the RW output section.
Image$$RW$$LimitOutputAddress of the byte beyond the end of the ZI output section. (The choice of the end of the ZI region rather than the end of the RW region is to maintain compatibility with legacy code.)
Image$$ZI$$BaseOutputAddress of the start of the ZI output section.
Image$$ZI$$LimitOutputAddress of the byte beyond the end of the ZI output section.

Input section symbols

If your code refers to the input-section symbols, it is assumed that you expect all the input sections in the image with the same name to be placed contiguously in the image memory map. If your scatter-loading description places these input sections non contiguously, the linker diagnoses an error because the use of the base and limit symbols over non contiguous memory usually produces unpredictable and undesirable effects.

Table 4.3. Section-related symbols

SymbolSection typeDescription
SectionName$$BaseInputAddress of the start of the consolidated section called SectionName.
SectionName$$LengthInputLength of the consolidated section called SectionName (in bytes).
SectionName$$LimitInputAddress of the byte beyond the end of the consolidated section called SectionName.
Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0377A