11.29 --execute_only

Adds the EXECONLY AREA attribute to all code sections.


The EXECONLY AREA attribute causes the linker to treat the section as execute-only.

It is the user's responsibility to ensure that the code in the section is safe to run in execute-only memory. For example:

  • The code must not contain literal pools.
  • The code must not attempt to load data from the same, or another, execute-only section.


This option is only supported for:

  • Processors that support the Armv8‑M.mainline or Armv8‑M.baseline architecture.
  • Processors that support the Armv7‑M architecture, such as Cortex®-M3, Cortex-M4, and Cortex‑M7.
  • Processors that support the Armv6‑M architecture.


    Arm has only performed limited testing of execute-only code on Armv6‑M targets.
Non-ConfidentialPDF file icon PDF versionDUI0801J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.