You copied the Doc URL to your clipboard.


Makes the load and execution region containing the RW and ZI output section position-independent.


Not supported for AArch64 state.


If this option is not used the region is marked as absolute. This option requires a value for --rw_base. If --rw_base is not specified, --rw_base=0 is assumed. Usually each writable input section must be Read-Write Position-Independent (RWPI).

If this option is selected, the linker:

  • Checks that the PI attribute is set on input sections to any read-write execution regions.
  • Checks that relocations between sections are valid.
  • Generates entries relative to the static base in the table Region$$Table.

    This is used when regions are copied, decompressed, or initialized.


You cannot use --rwpi:

  • With --fpic --scatter, or --xo_base.
  • When an object file contains execute-only sections.