2f97dca1
by Twaik Yont at 2026-03-03T20:52:59+01:00
wineandroid: Force --rosegment for wine-preloader on Android (API < 29, NDK r22+).
Android NDK r22 changed LLD behavior for targets below API 29 (see NDK
changelog, Issue 1196). For such targets clang passes
-Wl,--no-rosegment implicitly to the linker to improve backtrace
correctness on older devices.
As a result, wine-preloader is linked with --no-rosegment
semantics. Since wine-preloader uses -Wl,-Ttext=0x7d400000, the linker
assigns a very large file offset to the PT_LOAD segment containing
.text in order to preserve the required relationship between virtual
addresses and file offsets within the segment. This introduces a large
sparse gap (around 0x7d400000) and inflates the apparent ELF size to
~2GB.
Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com>