Skip to main content

Module elf

Module elf 

Source
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 LOAD segment must reach: 16 KB, the largest page size Android ships with.

Functions§

require_aligned_load_segments
Require every PT_LOAD segment in the ELF at path to declare an alignment of at least REQUIRED_LOAD_ALIGNMENT.
require_aligned_shared_libraries
Require every *.so directly inside directory to satisfy require_aligned_load_segments.