Skip to content

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

@cbeuw

Description

@cbeuw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-armTarget: ARM processors (arm, thumb and AArch64 targets)O-macosOperating system: MacOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions