Support small methods and selector indirection#103
Open
neuralmer wants to merge 1 commit intonygard:masterfrom
Open
Support small methods and selector indirection#103neuralmer wants to merge 1 commit intonygard:masterfrom
neuralmer wants to merge 1 commit intonygard:masterfrom
Conversation
|
Thanks for fixing this, I've been struggling for months without a working class-dump for iOS 14 and my attempts at hacking it failed. Once I merged this into my fork I'm up and running again so thanks a lot for figuring it out. |
manicmaniac
added a commit
to manicmaniac/class-dump
that referenced
this pull request
Dec 8, 2021
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.
Most of the
entsizefield is reserved for flags, see the definition ofmethod_list_tin https://opensource.apple.com/source/objc4/objc4-787.1/runtime/objc-runtime-new.hIf the methods are marked as "small methods", the pointers for name, type, and imp are signed 32-bit relative addresses. The addresses are relative to the location where the addresses are stored in memory, which translates to being relative to the location in the binary image.
Some of the pointers point into
__objc_selrefs, which appears to be an additional layer of indirection. I have not observed an__objc_selrefssection that was 32-bit aligned or in a 32-bit binary, but I have added a conditional in the case that it is encountered.I tested this change on a library that used to cause the crash listed in issue #100, and it appears to work with these changes (after changing
PLATFORM_IOSMACtoPLATFORM_MACCATALYSTto be able to build with Xcode 12). This fix is merged from work I did on https://github.com/preemptive/PPiOS-Rename.