-
Notifications
You must be signed in to change notification settings - Fork 26
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
Implement addends in data section relocations #71
Comments
Aaron1011
added a commit
to Aaron1011/faerie
that referenced
this issue
Apr 4, 2019
Fixes m4b#71 This commit creates a new variant 'Data' of the 'Reloc' enum. This can be used to define a relocation to a data section entry with a custom addend. With this change, it's now possible to create a relocation representing an index into an array or some other structure, where the addebd represents the offset from the base. I've only implemented this for ELF. Unfortunately, I'm completely unfamiliar with Mach-O, and don't have an OS X instance available to test with. Additionally, I've moved the magic '-4' into a constant, and added some documentation explaining where it comes from (though I may have a few details wrong). I've also tweaked the binary created by src/bin/main.rs to demonstrate using Reloc::Data
15 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/CraneStation/cranelift/blob/master/cranelift-faerie/src/backend.rs#L236-L239
They are needed for at least one test in the rustc test suite. cc rust-lang/rustc_codegen_cranelift#381.
The text was updated successfully, but these errors were encountered: