11.3 Placement of PLT sequences with the Base Platform model

The linker supports Procedure Linkage Table (PLT) generation for multiple load regions containing code when linking in Base Platform mode.

To turn on PLT generation when in Base Platform mode (--base_platform) use --pltgot=option that generates PLT sequences. You can use the option --pltgot_opts=crosslr to add entries in the PLT for calls from and to RELOC load-regions. PLT generation for multiple Load Regions is only supported for --pltgot=direct.

The --pltgot_opts=crosslr option is useful when you have multiple load regions that might be moved relative to each other when the image is dynamically loaded. The linker generates a PLT for each load region so that calls do not have to be extended to reach a distant PLT.

Placement of linker generated PLT sections:

  • When there is only one load region there is one PLT. The linker creates a section called .plt with an object anon$$obj.o.

  • When there are multiple load regions, a PLT section is created for each load region that requires one. By default, the linker places the PLT section in the first execution region containing code. You can override this by specifying the exact PLT section name in the scatter file.

    For example, a load region with name LR_NAME the PLT section is called .plt_LR_NAME with an object of anon$$obj.o. To precisely name this PLT section in a scatter file, use the selector:


Be aware of the following:

  • The linker gives an error message if the PLT for load region LR_NAME is moved out of load region LR_NAME.

  • The linker gives an error message if load region LR_NAME contains a mixture of RELOC and non-RELOC execution regions. This is because it cannot guarantee that the RELOC execution regions are able to reach the PLT at run-time.

  • --pltgot=indirect and --pltgot=sbrel are not supported for multiple load regions.

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