Automatic overlay support
For the linker to automatically allocate code sections to overlay regions, you must modify your C or assembly code to identify the parts to be overlaid. You must also set up a scatter file to locate the overlays.
The automatic overlay mechanism consists of:
- Special section names that you can use in your object files to mark code as overlaid.
AUTO_OVERLAYexecution region attribute. Use this in a scatter file to indicate regions of memory where the linker assigns the overlay sections for loading into at runtime.
- The command-line option
--overlay-veneersto make the linker redirect calls between overlays to a veneer that lets an overlay manager unload and load the correct overlays.
- A set of data tables and symbol names provided by the linker that you can use to write the overlay manager.
- The armlink
--emit_debug_overlay_sectioncommand-line options to add extra debug information to the image. This option permits an overlay-aware debugger to track which overlay is currently active.
This section contains the following subsections: