This commit is contained in:
bjorn3 2025-02-08 22:12:13 +00:00
parent 04e580fcc5
commit 6bd92ef9cb
8 changed files with 61 additions and 36 deletions

View file

@ -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();
}
}