diff options
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/debuginfo/object.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/debuginfo/object.rs | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs index 048a388731f..1c6e471cc87 100644 --- a/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs +++ b/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs @@ -73,16 +73,19 @@ impl WriteDebugInfo for ObjectProduct { } }; self.object - .add_relocation(from.0, Relocation { - offset: u64::from(reloc.offset), - symbol, - flags: RelocationFlags::Generic { - kind: reloc.kind, - encoding: RelocationEncoding::Generic, - size: reloc.size * 8, + .add_relocation( + from.0, + Relocation { + offset: u64::from(reloc.offset), + symbol, + flags: RelocationFlags::Generic { + kind: reloc.kind, + encoding: RelocationEncoding::Generic, + size: reloc.size * 8, + }, + addend: i64::try_from(symbol_offset).unwrap() + reloc.addend, }, - addend: i64::try_from(symbol_offset).unwrap() + reloc.addend, - }) + ) .unwrap(); } } |
