Expand description
ELF PT_LOAD alignment checks for packaged shared libraries.
Android 15 devices with 16 KB page sizes — and Google Play’s 2025
requirement — reject a package in which any shared library maps a LOAD
segment with an alignment below the page size. Every .so the CLI stages
into an Android package is checked here so a misaligned artifact fails the
build naming the file, rather than surfacing on the device as an install
error or a compatibility dialog.
Constants§
- REQUIRED_
LOAD_ ALIGNMENT - The alignment every packaged
LOADsegment must reach: 16 KB, the largest page size Android ships with.
Functions§
- require_
aligned_ load_ segments - Require every
PT_LOADsegment in the ELF atpathto declare an alignment of at leastREQUIRED_LOAD_ALIGNMENT. - require_
aligned_ shared_ libraries - Require every
*.sodirectly insidedirectoryto satisfyrequire_aligned_load_segments.