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

Add support for swift apps #8

Open
sprout42 opened this issue Nov 18, 2019 · 0 comments
Open

Add support for swift apps #8

sprout42 opened this issue Nov 18, 2019 · 0 comments

Comments

@sprout42
Copy link

I tried this on a swift iOS app and it didn't work

First issue is that the __objc_classname and __objc_methtype sections don't exist in the sections:

>>> bv.sections.keys()
dict_keys(['.extern', '__bss', '__common', '__const', '__const#19', '__cstring', '__data', '__eh_frame', '__got', '__la_symbol_ptr', '__objc_classlist', '__objc_classrefs', '__objc_const', '__objc_data', '__objc_imageinfo', '__objc_methname', '__objc_selrefs', '__stub_helper', '__stubs', '__swift5_assocty', '__swift5_builtin', '__swift5_capture', '__swift5_fieldmd', '__swift5_proto', '__swift5_protos', '__swift5_reflstr', '__swift5_typeref', '__swift5_types', '__text', '__unwind_info'])

it would appear that __objc_classlist is the section that contains references to the objective-C class information. There are also many sections that hold information about swift metadata, but I am still learning how to pull them apart.

It appears that swift name mangling follows different rules that are currently supported. Some examples:

$ echo '_$sypSgWOb' | xcrun swift-demangle
outlined init with take of Any?
$ echo '_$sSo10CFErrorRefaMa' | xcrun swift-demangle
type metadata accessor for __C.CFErrorRef
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

No branches or pull requests

1 participant