Add known Linux Mono builds - #155
Open
ero-qt wants to merge 29 commits into
Open
Conversation
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #153.
Part of #154.
Adds a table of 13 Linux Mono builds and the offsets measured from each. Attaching to a game that runs one of them now uses those measured offsets instead of guessing from the Unity version.
A build is recognized by its build ID, a value the linker stamps into the binary, different for every build. Unity''s Mono library has one up to 2019.4. Newer ones don''t, so those builds are recognized by
UnityPlayer.so''s ID instead. We only fall back to the player''s ID when the Mono library has none at all, never because the lookup missed, so a modified Mono can''t match a normal build''s entry and attach with its offsets.This fixes Linux games that can''t attach at all today.
Version::detectneeds to find either a file namedlibmono.so, or aUnityPlayer.soto read the Unity version out of. Some games have neither: they shiplibmonobdwgc-2.0.soand no player library, so detection finds nothing and attaching fails. 2018.4 is one of them. The build lookup runs first, so those games work now.The measurements also fill in the Linux offset tables, which is what games nobody has measured fall back on. Those tables were shared with Mac, so they''re split in two first and only the Linux copy takes the measurements. Mac keeps the values it had.