Keil Logo

Disabling Overlay Analysis

If you are in doubt about whether certain segments should be overlaid or not, you may disable overlaying of those segments. Segment overlaying may be disabled by the compiler, assembler, or linker.

To disable overlaying in the compiler...

  • When the compiler optimization level is set to 1 (using the OPTIMIZE compiler directive) the compiler does not use the OVERLAYABLE relocation type. Local data segments are not overlaid.

To disable overlaying in the assembler...

  • The assembler only creates overlayable segments when the OVERLAYABLE relocation type is specified in a SEGMENT definition. Remove all OVERLAYABLE relocation types from SEGMENT definitions to avoid overlaying data segments.

To disable overlaying in the linker...

  • The NOOVERLAY linker directive disables all data overlaying for the entire program.
  • The OVERLAY linker directive enables you to manipulate the call tree generated by the linker. For example, OVERLAY (sfname ! *) disables data overlaying for the function specified by sfname.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.