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

ELF: Properly handle address outside of file-backed regions #240

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

LukeFZ
Copy link
Contributor

@LukeFZ LukeFZ commented Dec 2, 2023

Currently, only cases where the virtual address is located outside of any ELF PHT entry are handled. However, since a PHT entry can also only be partially backed by file contents, this causes normally invalid address translations to succeed, which in turn leads to weird issues later on.

I've personally seen this cause issues with retrieving method pointers from Unity.Purchasing.AppleCore.dll on Android, where methodPointers points into .bss, but Cpp2IL still tries to read them from the file due to the entry containing the section being partially file-backed.

@SamboyCoding SamboyCoding merged commit fd42ad0 into SamboyCoding:development Jan 1, 2024
8 checks passed
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