You copied the Doc URL to your clipboard.

-frwpi, -fno-rwpi

Enables or disables the generation of Read-Write Position-Independent (RWPI) code.

Usage

When generating RWPI code, the compiler:

  • Addresses the writable data using offsets from the static base register sb. This means that:
    • The base address of the RW data region can be fixed at runtime.
    • Data can have multiple instances.
    • Data can be, but does not have to be, position-independent.
  • Sets the PI attribute on read/write output sections.

Note

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

Restrictions

The following restrictions apply:

  • This option is not supported in AArch64 state.
  • This option is not compatible with -fpic, -fpie, or -fbare-metal-pie options.

Default

The default is -fno-rwpi.

Was this page helpful? Yes No