 RealView Linker and Utilities Guide |
|
| Execution region description5.2.4. Execution region descriptionAn execution region has: a name a base address (either absolute or relative) an optional maximum size specification attributes that specify the properties of the execution region one or more input section descriptions (the modules placed into this execution region).
Figure 5.7 shows the components of a typical 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_nameNames the execution region. base_addressSpecifies the address where objects in the region are to be linked. base_address must be word‑aligned. +offsetDescribes 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_listThis specifies the properties of the execution region contents: ABSOLUTEAbsolute address. The execution address of the region is specified by the base designator. PIPosition-independent. OVERLAYOverlaid. FIXEDFixed 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. ALIGN alignmentIncrease the alignment constraint for the execution region from 4 to alignment. alignment must be a positive power of 2. If the execution region has a base_address then this must be alignment aligned. If the execution region has a +offset then the linker aligns the calculated base address of the region to an alignment boundary. EMPTYReserves 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. ZEROPADZero-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. PADVALUEDefines 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.
FILLCreates a linker generated region containing a value. If you specify FILL, you must give a value, for example: FILL 0xffffffff. The FILL attribute replaces the following combination: EMPTY ZEROPAD PADVALUE. In certain situations, for example, simulation, this is preferable to spending a long time in a zeroing loop. NOCOMPRESSMust not be compressed. UNINITMust not be zero initialized.
max_sizeAn optional number that instructs the linker to generate an error if the region has more than max_size bytes allocated to it. –lengthIf 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_descriptionSpecifies the content of the input sections. See Input section description.
When specifying the properties of the execution region: An execution region must be one of the attributes ABSOLUTE, PI, or OVERLAY. If no attribute is specified, ABSOLUTE is the default attribute of the execution region. Execution regions that use the +offset form of the base designator either inherit the attributes of the preceding execution region, (or of the containing load region if this is the first execution region in the load region), or have the ABSOLUTE attribute. Only root execution regions can be zero-initialized using the ZEROPAD attribute. Using the ZEROPAD attribute with a non root execution region generates a warning and the attribute is ignored. The attribute RELOC cannot be explicitly specified for execution regions. The region can only be RELOC by inheriting the attribute from a load region. It is not possible for an execution region that uses the +offset form of the base designator to have its own attributes (other than the ABSOLUTE attribute that overrides inheritance). Use the combination +0 ABSOLUTE to set a region to ABSOLUTE without changing the start location. Execution regions that are specified as PI or OVERLAY (or that have inherited the RELOC attribute) are permitted to have overlapping address ranges. The linker faults overlapping address ranges for ABSOLUTE and FIXED execution regions. RW data compression is enabled by default. The NOCOMPRESS keyword enables you to specify that an execution region must not be compressed in the final image. UNINIT specifies that any ZI output section in the execution region must not be zero-initialized. Use this to create execution regions containing uninitialized data or memory-mapped I/O.
Consecutive execution regions with the OVERLAY attribute and a base offset of +0 are given the same base address.
|
|