Skip to content

ci: align Android .so LOAD segments to 16 KB pages - #2

Open
MudDev wants to merge 1 commit into
mainfrom
fix/16kb-page-alignment
Open

ci: align Android .so LOAD segments to 16 KB pages#2
MudDev wants to merge 1 commit into
mainfrom
fix/16kb-page-alignment

Conversation

@MudDev

@MudDev MudDev commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The v0.2.0 release's libepix_snowflake.so has 4 KB aligned LOAD segments, so EpixNet's Android app trips the 16 KB page-size compatibility check on Android 15+ devices (the emulator shows an "App isn't 16 KB compatible" dialog naming libepix_snowflake.so: LOAD segment not aligned).

The Go external linker defaults to 4 KB max-page-size for android/arm64. Passing -Wl,-z,max-page-size=16384 through -extldflags fixes it.

Verified locally with NDK r30 and Go 1.26: llvm-readelf -l on the built .so shows every LOAD segment aligned to 0x4000 with the flag, 0x1000 without.

After merging this needs a new tag/release, then a bump of iptproxy.rev and iptproxy.sha256 in EpixNet so the Android build picks the fixed library up.

Android 15+ devices can boot with a 16 KB page size. The Go linker
defaults to 4 KB max-page-size, so libepix_snowflake.so fails the
16 KB alignment check and Android flags the whole app. Pass
max-page-size=16384 to the external linker for the android build.

Verified locally: llvm-readelf -l shows all LOAD segments at 0x4000
with the flag (0x1000 without).
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant