Skip to content

docs: the retail boot chain under Wine on Linux - #7232

Open
kett1m wants to merge 1 commit into
ItsNotRexed:mainfrom
kett1m:wine-first-boot
Open

kett1m wants to merge 1 commit into
ItsNotRexed:mainfrom
kett1m:wine-first-boot

Conversation

@kett1m

@kett1m kett1m commented Nov 23, 2026

Copy link
Copy Markdown

Claimed in the coordination issue as a new item.

Depends on: #7217, only for tests/test_docs_links.py to pass. That failure is the README fence on main, not a
link this page adds; with #7217 cherry-picked locally the test is OK.

What and why

docs/retail_boot_chain.md records the chain as measured on Windows. The runtime is meant to run under Wine too
(#217), and nobody had measured the retail executable there, so this adds the first pass on Linux as section 5: the
cross build, Wine 11.22, an RTX 3090 and the Vulkan device.

The section says plainly that nothing past stop 1 was observed on Wine, and it gives counts and error classes only:
no addresses, offsets, IID values or bytes from the executable.

Tested

AI-assisted: yes

@JoaoPauluu

Copy link
Copy Markdown

Reproduced on a second Linux machine, with the seven package DLLs in the folder. Two of the three passes match. --init differs. Counts and error classes only.

Setup: gta6rt from main 8575d36ed (this PR's base), a fresh cross build (clang-cl 23.1.5 + xwin 0.10.0, SDK 10.0.26100, RelWithDebInfo, -DLEONIDA_VULKAN_HEADERS_FETCH=ON). Wine 11.21 on CachyOS (KDE Wayland, through XWayland), RTX 3060, NVIDIA 620.70.06, LEONIDA_D3D12=vulkan, --overlay outside the game folder. The full 1.0.2.1 package from my own copy (make_game.py --check: all 108 files present).

Pass Here
--dry-run Exit 0, 5 modules mapped. The executable has 54 shim, 432 host, 72 bound to the four bundled modules, 29 unimplemented.
--init Exit 0. 4 dllmain events (the four bundled DLLs), 4 tls_callback events for the executable, and no exception event.
--run Exit 5, an unhandled access violation (read at null). The faulting frame is in gta6rt.exe host code, and the stack runs back through the title and ucrtbase into the title again, which fits "the title's first static initializer calls a shim". I didn't check by disassembly that it's the std::mutex lock.

What this adds to the section:

  • --dry-run: your 102 add up exactly. 29 unimplemented + 72 that bind to the bundled DLLs = 101, and the shim count is 54 here against your 53. The one-shim difference is probably the import that main served after your run. It might be worth one sentence with these numbers, so a reader who has the DLLs knows what to expect.
  • --init: I don't see the access violation in the second TLS callback. Either having the bundled DLLs mapped (and their dllmain run first) changes that path, or it's Wine 11.21 vs 11.22. A run without the DLLs on this machine would tell them apart; I can do that if it helps. As written, the row could say the access violation was seen without the package DLLs.
  • --run: the same stop and exit code as yours.

AI-assisted (Claude Code).

@kett1m

kett1m commented Nov 23, 2026

Copy link
Copy Markdown
Author

Thanks, that is exactly the run the section was missing. Updated in the head:

  • --dry-run: the row now carries both numbers. With the seven package DLLs present, 54 shim, 432 host, 72 bound to the four bundled modules and 29 unimplemented; 72 of my 102 bind once the package is there and 29 stay missing.
  • --init: the access violation is now stated as seen without the package DLLs, and the row says the run with them present had four dllmain events and no exception. I left it open whether the bundled DllMains running first or Wine 11.21 against 11.22 removes it.
  • --run: the same stop and exit 5 on both machines, as you found.

If you do run the no-DLLs case on that machine, the result would settle the --init question and I will fold it in.

The chain in this page is Windows-only. This adds the first pass on Linux: the cross build, Wine 11.22, an RTX 3090.

With a folder that holds only the executable, --dry-run maps it at its preferred base with 53 shim, 432 host and 102
unimplemented imports; --init exits 0 and the trace holds a handled access violation inside the second TLS callback;
--run stops in the runtime before the title's first static initializer finishes, in the runtime's own static TLS at
module index 0. That is RT-259's subject, and ItsNotRexed#4313 is its fix.

Counts and error classes only, no addresses, offsets or bytes from the executable.
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.

2 participants