3.1.6 Restrictions on image structure

When an instruction accesses a memory address on an AArch64 target, the data must be within 4GB of the program counter.

For example, consider the following scatter file:

LOAD_REGION 0x0000000000 0x200000
{
    ROOT_REGION +0
    {
        *(Init, +FIRST)
        * (+RO)
        * (+RW, +ZI)
    }
    STACKHEAP 0x1FFFF0 EMPTY -0x18000
    {
    }
}

LOAD_REGION2 0x4000000000 0x200000
{
    ROOT_REGION2 +0
    {
        *(high_mem)
    }
}

LOAD_REGION2 is 16GB away from LOAD_REGION, so data in high_mem is not accessible from code in LOAD_REGION. This results in a relocation out of range error at link time.

Non-ConfidentialPDF file icon PDF versionDUI0803J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.