diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-23 20:17:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-23 20:17:52 +0200 |
| commit | a760954ca9823797660b07ed830dcf1eb8887e30 (patch) | |
| tree | 1d57e0e251238ce647e5cc0fcdec21ae4a3e65ce /compiler/rustc_codegen_cranelift/src/debuginfo/object.rs | |
| parent | afb6c4681ab1701e03e03669ec41e8e7c8a495c2 (diff) | |
| parent | 96152c7df3296c00498a0a8d886b058a09325290 (diff) | |
Rollup merge of #124286 - bjorn3:sync_cg_clif-2024-04-23, r=bjorn3
Subtree sync for rustc_codegen_cranelift This fixes a crash when compiling the standard library. In addition the Cranelift update fixes all the 128bit int abi incompatibility between cg_clif and cg_llvm. r? ``@ghost`` ``@rustbot`` label +A-codegen +A-cranelift +T-compiler
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/debuginfo/object.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/debuginfo/object.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs index 27eabd8a0a6..65f4c67b21f 100644 --- a/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs +++ b/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs @@ -2,7 +2,7 @@ use cranelift_module::{DataId, FuncId}; use cranelift_object::ObjectProduct; use gimli::SectionId; use object::write::{Relocation, StandardSegment}; -use object::{RelocationEncoding, SectionKind}; +use object::{RelocationEncoding, RelocationFlags, SectionKind}; use rustc_data_structures::fx::FxHashMap; use crate::debuginfo::{DebugReloc, DebugRelocName}; @@ -72,9 +72,11 @@ impl WriteDebugInfo for ObjectProduct { Relocation { offset: u64::from(reloc.offset), symbol, - kind: reloc.kind, - encoding: RelocationEncoding::Generic, - size: reloc.size * 8, + flags: RelocationFlags::Generic { + kind: reloc.kind, + encoding: RelocationEncoding::Generic, + size: reloc.size * 8, + }, addend: i64::try_from(symbol_offset).unwrap() + reloc.addend, }, ) |
