1.15 -fropi, -fno-ropi [BETA]

Enables or disables the generation of Read-Only Position-Independent (ROPI) code.


This topic describes a [BETA] feature.


When generating ROPI code, the compiler:
  • Addresses read-only code and data PC-relative.
  • Sets the Position Independent (PI) attribute on read-only output sections.


  • This option is independent from -frwpi, meaning that these two options can be used individually or together.
  • When using -fropi, -fropi-lowering is automatically enabled.


The default is -fno-ropi.


The following restrictions apply:
  • This option is not supported in AArch64 mode.
  • This option cannot be used with C++ code.
  • This option is not compatible with -fpic, -fpie, or -fbare-metal-pie options.
Related reference
1.17 -frwpi, -fno-rwpi [BETA]
1.18 -frwpi-lowering, -fno-rwpi-lowering [BETA]
1.16 -fropi-lowering, -fno-ropi-lowering [BETA]
Non-ConfidentialPDF file icon PDF versionARM DUI0774E
Copyright © 2014-2016 ARM. All rights reserved.