| |||
| Home > BPABI and SysV shared libraries and executables > Bare metal and DLL-like memory model | |||
Base Platform Application Binary Interface (BPABI)
files have a standard memory model that is described in the BPABI
specification. By using the --bpabi command-line
option, the linker automatically applies this model and ignores
any scatter file that you specify on the command-line. This is equivalent
to the following image layout:
LR_1 <read-only base address>
{
ER_RO +0
{
*(+RO)
}
}
LR_2 <read-write base address>
{
ER_RW +0
{
*(+RW)
}
ER_ZI +0
{
*(+ZI)
}
}
If the option is
specified, --ropiLR_1 is marked as position-independent.
Likewise, if the option is
specified, --rwpiLR_2 is marked as position-independent.
In most cases, you must specify the --ro_base and --rw_base switches,
because the default values, 0x8000 and 0 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.
If you require a more complicated memory layout, use the Base
Platform linking model, --base_platform.
Linker Reference: