This commit is contained in:
bjorn3 2025-02-01 16:43:56 +00:00
parent 42271d452c
commit c8f0f36d66
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();
}
}