11.2 Scatter files for the Base Platform linking model

Scatter files containing relocatable and non-relocatable load regions for the Base Platform linking model.

Standard BPABI scatter file with relocatable load regions

If you do not specify a scatter file when linking for the Base Platform linking model, the linker uses a default scatter file defined for the standard Base Platform Application Binary Interface (BPABI) memory model. This scatter file defines the following relocatable load regions:

LR1 0x8000 RELOC
{
    ER_RO +0
    {
        *(+RO)
    }
}
LR2 0x0 RELOC
{
    ER_RW +0
    {
        *(+RW)
    }
    ER_ZI +0
    {
        *(+ZI)
    }
}

This example conforms to the BPABI, because it has the same two-region format as the BPABI specification.

Scatter file with some load regions that are not relocatable

This example shows two load regions LR1 and LR2 that are not relocatable.

LR1 0x8000
{
    ER_RO +0
    {
        *(+RO)
    }
    ER_RW +0
    {
        *(+RW)
    }
    ER_ZI +0
    {
        *(+ZI)
    }
}
LR2 0x10000
{
    ER_KNOWN_ADDRESS +0
    {
        *(fixedsection)
    }
}
LR3 0x20000 RELOC
{
    ER_RELOCATABLE +0
    {
        *(floatingsection)
    }
}

The linker does not have to generate dynamic relocations between LR1 and LR2 because they have fixed addresses. However, the RELOC load region LR3 might be widely separated from load regions LR1 and LR2 in the address space. Therefore, dynamic relocations are required between LR1 and LR3, and LR2 and LR3.

Use the options --pltgot=direct --pltgot_opts=crosslr to ensure a PLT is generated for each load region.

Non-ConfidentialPDF file icon PDF versionARM DUI0474M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.