9.2.1. Base Platform Application Binary Interface (BPABI) linking model

The BPABI memory model in scatter-loading format is:

LR_1 <read-only base address> ; default 0x8000
{
    ER_RO  +0
    {
        *(+RO)
    }
}

LR_2 <read-write base address> ; default 0x0
{
    ER_RW  +0
    {
        *(+RW)
    }
    ER_ZI  +0
    {
        *(+ZI)
    }
}

This works well for loadable applications or DLLs. In most cases, you must specify the --ro_base and --rw_base options, because the default values, 0x8000 and 0x0 respectively, might not be suitable for your platform. These addresses do not have to reflect the addresses to which the image is relocated at run time.

The output from example 7-1 confirms that the default read-only base address of 0x8000 is used when building for the BPABI linking model. In fact, the default memory layout for the BPABI model is the same as the bare-metal linking model.

Most compiler options are supported under the BPABI model. The options specific to the BPABI model are linker options. To build a BPABI executable, the --bpabi option must be specified. When building a shared library, then the --dll option must also be specified to armlink. The final option to consider is the --pltgot=<type> option, where <type> equals none, direct, indirect or sbrel. For more information, see Other dynamic image related linker (armlink) options, and also the linker documentation

Copyright © 2010 ARM. All rights reserved.ARM DAI 0242A
Non-ConfidentialID011411