Skip to content

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

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

Closed
cbeuw opened this issue May 1, 2023 · 2 comments
Labels
O-arm Target: ARM processors (arm, thumb and AArch64 targets) O-macos Operating system: MacOS

Comments

@cbeuw
Copy link
Contributor

cbeuw commented May 1, 2023

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.

@bjorn3
Copy link
Member

bjorn3 commented May 2, 2023

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

@bjorn3 bjorn3 mentioned this issue May 2, 2023
6 tasks
@bjorn3 bjorn3 added O-macos Operating system: MacOS O-arm Target: ARM processors (arm, thumb and AArch64 targets) labels May 2, 2023
@bjorn3 bjorn3 closed this as completed in 39b25b3 Apr 7, 2024
@bjorn3
Copy link
Member

bjorn3 commented Apr 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-arm Target: ARM processors (arm, thumb and AArch64 targets) O-macos Operating system: MacOS
Projects
None yet
Development

No branches or pull requests

2 participants