StoreRules

Rules · Support 16 KB page sizes · Check if your app is impacted

Check the RELRO security flag

In plain words

Enable the RELRO flag in your native build; when GNU_RELRO shares a writable LOAD segment with other writable data, its end address must be 16 KB aligned (0x4000).

  • Modern linkers use RELRO to make relocation target sections (such as .got and .data.rel.ro) read-only after dynamic relocations finish.
  • The 16 KB alignment requirement applies when GNU_RELRO shares a writable LOAD segment with subsequent writable data such as .data or .bss.
  • The end address is VirtAddr + MemSiz of the GNU_RELRO segment.
  • If misaligned, the Android Linker makes adjacent writable data in the same 16 KB page read-only, crashing the app with SIGSEGV on write.
  • This typically happens with .so files built with NDK toolchain r27 and lower without enabling the relevant flags.

Summary written by StoreRules and checked against the official text.

From the official text

To mitigate security exploits, modern linkers use the Relocation Read-Only (RELRO) flag to make relocation target sections (such as .got and .data.rel.ro) of the shared object file read-only after dynamic relocations are complete. Enable the RELRO flag in your build. When GNURELRO shares a writable LOAD segment with …

Read the full official text ↗ Open in the StoreRules library Ask whether your app complies

Change history

First seen: 2026-10-16

Developers' cases about this clause

No cases yet.

Share your case

Clauses under this one