You copied the Doc URL to your clipboard.

--rwpi linker option

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

Usage

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.

Restrictions

You cannot use --rwpi:

  • With --scatter, --shared , or --sysv.

  • If an object file contains execute-only sections.

Was this page helpful? Yes No