rustc_codegen_cranelift icon indicating copy to clipboard operation
rustc_codegen_cranelift copied to clipboard

`add_debug_reloc` emits `RelocationKind::Relative` + `RelocationEncoding::Generic` + non-zero `addend` relocation, which isn't implemented for AArch64 Mach-O

Open cbeuw opened this issue 2 years ago • 1 comments

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.

cbeuw avatar May 01 '23 18:05 cbeuw

See also https://github.com/bjorn3/rustc_codegen_cranelift/issues/1248. I will add this issue to the list.

bjorn3 avatar May 02 '23 08:05 bjorn3

This particular issue should now be fixed, but arm64 macOS support is still blocked on vararg support.

bjorn3 avatar Apr 07 '24 16:04 bjorn3