This example shows the use of a scatter file with the Base Platform linking model.
The standard Base Platform Application Binary Interface (BPABI) memory model in scatter file format, with relocatable load regions is:
This example conforms to the BPABI, because it has the same two-region format as the BPABI specification.
The next example shows two load regions LR1 and LR2 that are not relocatable.
The linker does not have to generate dynamic relocations between
LR1 and LR2 because they have fixed addresses. However, the
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.