5.2.3. Load region description

A load region has:

Figure 5.6 shows the components of a typical load region description.

Figure 5.6. Components of a load region description

The syntax, in BNF, is:

load_region_description ::=    load_region_name  (base_address  | ("+" offset)) [attribute_list] [ max_size ]
       "{"
          execution_region_description+ 
       "}"	

where:

load_region_name

The linker generates a Load$$exec_region_name$$base symbol for each execution region. This symbol holds the load address of the execution region (see Execution region description). The load_region_name, however, is used only to identify each region, that is, it is not used to generate Load$$region_name symbols.

Note

An image created for use by a debugger requires a unique base address for each region because the debugger must load regions at their load addresses. Overlapping load region addresses result in part of the image being overwritten.

A loader or operating system, however, can correctly load overlapping position-independent regions. One or more of the position-independent regions is automatically moved to a different address.

base_address

This specifies the address where objects in the region are to be linked. base_address must be word-aligned.

+offset

Describes a base address that is offset bytes beyond the end of the preceding load region. The value of offset must be zero modulo four. If this is the first load region, then +offset means that the base address begins offset bytes after zero.

attribute_list

This specifies the properties of the load region contents:

ABSOLUTE

Absolute address.

PI

Position-independent.

RELOC

Relocatable.

OVERLAY

Overlaid.

NOCOMPRESS

Should not be compressed.

You can specify only one of the attributes ABSOLUTE, PI, RELOC, and OVERLAY. The default load region attribute is ABSOLUTE.

Load regions that have one of PI, RELOC, or OVERLAY attributes can have overlapping address ranges. The linker faults overlapping address ranges for ABSOLUTE load regions.

The OVERLAY keyword enables you to have multiple execution regions at the same address. ARM does not provide an overlay mechanism in RVDK. To use multiple execution regions at the same address, you must provide your own overlay manager.

RW data compression is enabled by default. The NOCOMPRESS keyword enables you to specify that a load region should not be compressed in the final image.

max_size

This specifies the maximum size of the load region. (If the optional max_size value is specified, armlink generates an error if the region has more than max_size bytes allocated to it.)

execution_region_description

This specifies the execution region name, address, and contents. See Execution region description.

Copyright © 2005 ARM Limited. All rights reserved.ARM DUI 0285B
Non-Confidential