5.2.4. Execution region description

An execution region has:

Figure 5.7 shows the components of a typical execution region description.

Figure 5.7. Components of an execution region description

The syntax, in BNF, is:


execution_region_description ::= 

  exec_region_name (base_address | "+" offset) [attribute_list] [max_size | "–" length]
        "{" 
            input_section_description
        "}"

where:

exec_region_name

Names the execution region.

base_address

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 execution region. The value of offset must be zero modulo four.

If there is no preceding execution region (that is, if this is the first execution region in the load region) then +offset means that the base address begins offset bytes after the base of the containing load region.

If the +offset form is used and the encompassing load region has the RELOC attribute, the execution region inherits the RELOC attribute. However, if a fixed base_address is used, future occurrences of offset do not inherit the RELOC attribute.

attribute_list

This specifies the properties of the execution region contents:

ABSOLUTE

Absolute address. The execution address of the region is specified by the base designator.

PI

Position-independent.

OVERLAY

Overlaid.

FIXED

Fixed address. Both the load address and execution address of the region is specified by the base designator (the region is a root region). See Creating root execution regions. The base designator must be either an absolute base address, or an offset of +0.

EMPTY

Reserves an empty block of memory of a given length in the execution region, typically used by a heap or stack. See Reserving an empty region for further information.

PADVALUE

Defines the value of any padding. If you specify PADVALUE, you must give a value, for example:


EXEC 0x10000 PADVALUE 0xffffffff EMPTY ZEROPAD 0x2000

This creates a region of size 0x2000 full of 0xffffffff.

PADVALUE must be a word in size. PADVALUE attributes on load regions are ignored.

ZEROPAD

Zero initialized sections are written in the ELF file as a block of zeros and, therefore, do not have to be zero-filled at runtime.

In certain situations, for example. simulation, this is preferable to spending a long time in a zeroing loop.

NOCOMPRESS

Should not be compressed.

UNINIT

Must not be zero initialized.

max_size

An optional number that instructs the linker to generate an error if the region has more than max_size bytes allocated to it.

–length

If the length is given as a negative value, the base_address is taken to be the end address of the region. Typically used with EMPTY to represent a stack that grows down in memory. See Reserving an empty region for more information.

input_section_description

Specifies the content of the input sections. See Input section description.

When specifying the properties of the execution region:

Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0206F
Non-Confidential