|Home > Overlays > Automatic overlay support > Overlay veneer|
armlink can generate an overlay veneer for each function call between two overlays, or between non-overlaid code and an overlay.
A function call or return can transfer control between two overlays or between non-overlaid code and an overlay. If the target function is not already present at its intended execution address, then the target overlay has to be loaded.
To detect whether the target overlay is present, armlink can arrange for all such function calls to be diverted through
the overlay manager entry point,
enable this feature, use the armlink command-line
This option causes a veneer to be generated for each affected function call, so that the
call instruction, typically a
BL instruction, points at
the veneer instead of the target function. The veneer in turn saves some registers on
the stack, loads some information about the target function and the overlay that it is
in, and transfers control to the overlay manager entry point. The overlay manager must