-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Mac OS X Fragile Compatibility #54
Comments
Can you include 2 binaries compiled in the 2 different ways? |
Take a look at these files, I've complied them with I also compiled the same thing with the latest version |
Btw, I was under the impression that older versions of Xcode used the GNU runtime by default, but that's not the case. On those versions, Xcode uses what LLVM calls the Mac OS X Fragile runtime. I couldn't make |
Actually, I just figured out the ObjFW Runtime has a compiler of its own and was able to use it on macOS. It doesn't support cross-compilation though, so I could only generate binaries for Intel and Apple Silicon. |
For extra reference, sharing two binaries from the Mac OS X 10.0 Public Beta. I think they will be the worst case we will ever see. go-macho, MachOExplorer, and MachOView have no idea how to parse them, but class-dump is able to process these binaries normally. |
While I'm here: |
Is your feature request related to a problem? Please describe.
The current implementation of go-macho only properly supports the non-fragile version of the Mac OS X Objective-C Runtime. Code that targeting the fragile version of the runtime may not be parsed correctly. In
clang
, the runtime can be defined through the-fobjc-runtime=${OBJC_RUNTIME}
flag (https://clang.llvm.org/doxygen/classclang_1_1ObjCRuntime.html#af19fe070a7073df4ecc666b44137c4e5).Describe the solution you'd like
Have a solution that is able to handle both runtime variants. If possible to distinguish the runtime used from the binary, implement full support, otherwise prioritize compatibility with the non-fragile runtime.
Describe alternatives you've considered
Not implement support for the Mac OS X Fragile Runtime and explicitly state that go-macho support the non-fragile runtime only. If possible, reject or warn about binaries using incompatible runtimes.
Search
Code of Conduct
Additional context
No response
The text was updated successfully, but these errors were encountered: