Generates execute-only code, and prevents the compiler from generating any data accesses to code sections.
To keep code and data in separate sections, the compiler disables literal
pools and branch tables when using the -mexecute-only
option.
Restrictions
Execute-only code must be T32 code.
Execute-only code is only supported for:
Processors that support the Arm®v8‑M architecture, with or without the Main Extension.
Processors that support the Armv7‑M architecture, such as the
Cortex®-M3.
If your application calls library functions, the library objects included in the image are not execute-only compliant. You must ensure these objects are not assigned to an execute-only memory region.
Note:
Arm does not
provide libraries that are built without literal pools. The libraries still use literal
pools, even when you use the -mexecute-only option.
Note:
LTO does not honor the armclang -mexecute-only option. If you use the armclang -flto or -Omax options, then the compiler cannot generate execute-only code.
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.