`add_debug_reloc` emits `RelocationKind::Relative` + `RelocationEncoding::Generic` + non-zero `addend` relocation, which isn't implemented for AArch64 Mach-O
Part of #1248.
To reproduce, simply y.rs build on an Apple Silicon machine. Sysroot build fails with
error: error writing object file: unimplemented relocation Relocation { offset: 32, size: 32, kind: Relative, encoding: Generic, symbol: SymbolId(22), addend: -4 }
This relocation is emitted here https://github.com/bjorn3/rustc_codegen_cranelift/blob/215dd7aa0d70cf7396100715326a37c81b06f056/src/debuginfo/object.rs#L69-L81
This is unimplemented in gimli-rs.
I'm unfamiliar with executable formats, so not sure if this should be implemented in gimli-rs or make rustc_codegen_cranelift emit something else.
See also https://github.com/bjorn3/rustc_codegen_cranelift/issues/1248. I will add this issue to the list.
This particular issue should now be fixed, but arm64 macOS support is still blocked on vararg support.