Keil Logo Arm Logo

Technical Support

On-Line Manuals

Linker Reference Guide

Conventions and feedback Linker command-line options Linker steering file command reference Formal syntax of the scatter file BNF notation used in scatter-loading description s Syntax of a scatter file About load region descriptions Syntax of a load region description Load region attributes About execution region descriptions Syntax of an execution region description Execution region attributes Address attributes for load and execution regions Considerations when using a relative address +offs Considerations when using a relative address +offs Inheritance rules for load region address attribut Inheritance rules for execution region address att Inheritance rules for the RELOC address attribute About input section descriptions Syntax of an input section description How the linker resolves multiple matches when proc Behavior when .ANY sections overflow because of li How the linker resolves path names when processing About Expression evaluation in scatter files Expression usage in scatter files Expression rules in scatter files Execution address built-in functions for use in sc Scatter files containing relative base address loa ScatterAssert function and load address related fu Symbol related function in a scatter file Example of aligning a base address in execution sp AlignExpr(expr, align) function GetPageSize() function SizeOfHeaders() function

Linker Reference Guide

Inheritance rules for load region address attributes

Inheritance rules for load region address attributes

For a load region to inherit the attributes of a previous load region, specify a +offset base address for that region. A load region cannot inherit attributes if:

  • you explicitly set the attribute of that load region

  • the load region immediately before has the OVERLAY attribute.

You can explicitly set a load region with the ABSOLUTE, PI, RELOC, or OVERLAY address attributes.

This example shows the inheritance rules for setting the address attributes of load regions:

Example 5. Load region inheritance

LR1 0x8000 PI
{
    ...
}
LR2 +0             ; LR2 inherits PI from LR1
{
    ...
}
LR3 0x1000         ; LR3 does not inherit because it has no relative base
                     address, gets default of ABSOLUTE
{
    ...
}
LR4 +0             ; LR4 inherits ABSOLUTE from LR3
{
    ...
}
LR5 +0 RELOC       ; LR5 does not inherit because it explicitly sets RELOC
{
    ...
}
LR6 +0 OVERLAY     ; LR6 does not inherit, an OVERLAY cannot inherit
{
    ...
}
LR7 +0             ; LR7 cannot inherit OVERLAY, gets default of ABSOLUTE
{
    ...
}

Copyright © 2008, 2011-2012 ARM. All rights reserved.ARM DUI 0458C
Non-ConfidentialID062912

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.