On Mon, 2 Aug 2021, Martin Storsjö wrote:
On Mon, 2 Aug 2021, Martin Storsjo wrote:
As the preloader is linked with -nodefaultlibs, we need to provide builtin helpers for division on arm (that normally are provided by libgcc or compiler-rt). The bundled version is taken from the LLVM 8.0.0 release, which still was dual licensed under the MIT and University of Illinois licenses. (In the 9.0.0 release, all of LLVM was relicensed to a different license.)
Since 28fe84da45bea7de56539b50eac8ebcec54342de, the main exe image must be mappable at its desired base address, which essentially requires the preloader.
This fixes the original issue that lead to https://bugs.winehq.org/show_bug.cgi?id=51539.
Signed-off-by: Martin Storsjo martin@martin.st
I ran into some issues with this patch on some other system, so don't apply it quite yet if it otherwise would have seemed ok, pending some more debugging.
Ok, I found the bug - we weren't setting WINELOADER_LDFLAGS on the 'wine' loader, so it ended up being loaded overlapping the reserved regions. (If the executables are linked as PIE, it's loaded anywhere and the issue doesn't occur.) Updated patch following...
// Martin