-
Notifications
You must be signed in to change notification settings - Fork 156
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
Support Aarch64Call relocations for Mach-O #465
Conversation
Thanks! Based on a brief look this is good. Where was the panic occurring? |
Ah okay, so not panics, just returning errors (maybe your crate was unwrapping that error). |
Ah sorry, of course, don't know how I managed to mix that up. (The panic I was seeing was from cranelift unwrapping that error, here to be precise). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll merge this after the unrelated archive code has been fixed.
Including calls with arbitrary addends
9c5bdf6
to
76877fe
Compare
(Rebased so that CI passes now that the formatting issue has been fixed on master) |
This PR adds support for relocations with
RelocationEncoding::Aarch64Call
on Mach-O. Before this PR we would error out, as the relocation has a size of 26 which was unhandled, and we weren't setting the appropriater_type
. After this PR we support relocations withRelocationEncoding::Aarch64Call
and an arbitrary addend.This PR also handles a few extra cases of the relocation size (21 and 12) in order to support the usage of Mach-O specific relocations like
ARM64_RELOC_PAGE21
andARM64_RELOC_PAGEOFF12
, respectively.