Problem
Rocket League (Epic, 64-bit) ships Microsoft's x64 ucrtbase.dll and api-ms-win-crt-*.dll next to RocketLeague.exe and Launcher.exe. Wine searches the program's folder first. So xtajit64.dll's CRT imports loaded the game's x64 ucrtbase.dll before the emulator ran. The loader then called its x86 entry point as ARM64 code, and the process stopped with c000001d at ucrtbase.dll+0x63c10 (the bytes there are 48 89 5c 24 08, an x86 prologue).
WINEDLLOVERRIDES=ucrtbase=b does not help. The iOS unix loader never replaces a native image with the builtin, and the AMD64 builtin search looks in x86_64-windows, which the app does not ship.
Change
madeira_force_builtin_dll now also returns TRUE for ucrtbase.dll and every api-ms-win-crt-* name, so the loader searches only system32 for them. This matches Windows 10 and later: there, api-ms-win-crt-* are API sets and the system UCRT always wins over an app-local copy. MADEIRA_NATIVE_XINPUT still affects only the XInput names.
Testing
- iPad Pro 12.9" (6th generation), iPadOS 27.0.1, Madeira Debug build.
- Before:
Launcher.exestopped at once withc000001d. - After:
Launcher.exe(Wine Mono) startsRocketLeague.exe, and the game reaches its main menu and renders. - The rebuilt
ntdll.dllmatched the shipped one byte for byte (apart from the 6 timestamp bytes) before this change, so the only difference in the binary is this patch.
The Madeira side (Epic Games library, faultrep.dll, the rebuilt ntdll.dll) comes in a separate PR to willfaust/Madeira.
Conflicts with madeira-lgpl now; could you rebase?