Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle duplicate thunks #4

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conversation

disinvite
Copy link
Collaborator

Merging my PR isledecomp/isle#1113 over here. Original notes:

Debug builds put their thunk functions right at the start of .text. To match these up, we just scan the list in orig and recomp and look for cases where each points to the same real function that has already been matched.

I had assumed each thunk would only appear once, but there are duplicates in BETA10. (I would guess that only one ends up being used in most/all cases.)

This changes match_thunks() so that we detect any duplicates and match in order of the thunk's virtual address. This is probably a naive way to do it, but it works fine for the code in its current state. (Open question: does thunk order depend on module order?)

@jonschz
Copy link
Collaborator

jonschz commented Oct 24, 2024

Since this has been reviewed on the main branch, is there anything to be done here? I haven't looked into the effects of this change in detail yet, please tell me if you want me to do so.

@disinvite disinvite merged commit 7d48f48 into isledecomp:master Oct 25, 2024
3 checks passed
@disinvite disinvite deleted the thunk-dupe branch October 25, 2024 01:54
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.

3 participants