You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unimplemented relocation addend Relocation { offset: 104, size: 26, kind: Relative, encoding: AArch64Call, symbol: SymbolId(3), addend: -4 }")', <some path>/.cargo/registry/src/github.com-1ecc6299db9ec823/cranelift-object-0.86.1/src/backend.rs:500:22
Versions and Environment
Cranelift version or commit: 0.86.1
Operating system: MacOS
Architecture: M1
Extra Info
This works for me on aarch64-unknown-gnu (see https://cirrus-ci.com/task/6079482023903232 - it runs a lot of additional things, but near the bottom of the "test" task it compiles the Fibonacci function fine), but not aarch64-apple-darwin. It also works on x86_64-apple-darwin.
The text was updated successfully, but these errors were encountered:
Thanks for the report. Did this CLIF come from Wasmtime or some other frontend? (I ask because we try to support Wasmtime's use of Cranelift on aarch64-apple-darwin but the use of Cranelift with other frontends is much less well-tested. That doesn't mean we don't want to support it, I'm just trying to judge the severity.) It sounds like we need to implement another relocation case here. If you're willing to dig into it further, I'd be happy to review a PR.
Did this CLIF come from Wasmtime or some other frontend?
It came from a different frontend (a small compiler I'm writing). The problem seems to be withcranelift-object, because I can run the same program without error by using cranelift-jit (which I have adopted as a stopgap solution).
If you're willing to dig into it further, I'd be happy to review a PR.
I'd be happy to, but I'm not sure what a relocation is :)
teymour-aldridge
changed the title
Cranelift: error "unimplemented relocation addend Relocation" on M1 Mac only
Cranelift: error "unimplemented relocation addend Relocation" on MacOS on aarch64
Aug 5, 2022
I think this might already be fixed upstream in gimli-rs/object#465, so it might be a case of just updating the object crate whenever they do their next release.
Thanks for filing an issue! Please fill out the TODOs below.
.clif
Test CaseSteps to Reproduce
Expected Results
Actual Results
The program paniced:
Versions and Environment
Cranelift version or commit:
0.86.1
Operating system: MacOS
Architecture: M1
Extra Info
This works for me on aarch64-unknown-gnu (see https://cirrus-ci.com/task/6079482023903232 - it runs a lot of additional things, but near the bottom of the "test" task it compiles the Fibonacci function fine), but not aarch64-apple-darwin. It also works on x86_64-apple-darwin.
The text was updated successfully, but these errors were encountered: