add debug info

This commit is contained in:
Folkert 2022-11-10 22:16:52 +01:00
parent 11360edf7b
commit ccc69c2f16
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -364,6 +364,7 @@ pub(crate) fn surgery_pe(executable_path: &Path, metadata_path: &Path, roc_app_b
} = app_relocation;
if let Some(destination) = md.exports.get(name) {
dbg!(&name);
match relocation.kind() {
object::RelocationKind::Relative => {
// we implicitly only do 32-bit relocations
@ -383,6 +384,8 @@ pub(crate) fn surgery_pe(executable_path: &Path, metadata_path: &Path, roc_app_b
// we implicitly only do 32-bit relocations
debug_assert_eq!(relocation.size(), 32);
dbg!(&name);
let delta =
destination - section_virtual_address as i64 - *offset_in_section as i64
+ relocation.addend();
@ -411,6 +414,8 @@ pub(crate) fn surgery_pe(executable_path: &Path, metadata_path: &Path, roc_app_b
);
}
dbg!(&name);
match relocation.kind() {
object::RelocationKind::Relative => {
// we implicitly only do 32-bit relocations